Error making the suttacentral development environment work on my machine

I am getting an error relating to copy-webpack-plugin when trying to run make prepare-host:

npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient…
npm WARN old lockfile
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: suttacentral@2.0.0
npm ERR! Found: copy-webpack-plugin@4.6.0
npm ERR! node_modules/copy-webpack-plugin
npm ERR! copy-webpack-plugin@“8.0.0” from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! copy-webpack-plugin@“8.0.0” from the root project
npm ERR!
npm ERR! Conflicting peer dependency: webpack@5.24.3
npm ERR! node_modules/webpack
npm ERR! peer webpack@"^5.1.0" from copy-webpack-plugin@8.0.0
npm ERR! node_modules/copy-webpack-plugin
npm ERR! copy-webpack-plugin@“8.0.0” from the root project

npm list copy-webpack-plugin gives;


Any suggestions from those who a knowledgeable in this area?


npm list webpack gives;

├─┬ copy-webpack-plugin@10.2.4
│ └── webpack@5.70.0 deduped
└─┬ webpack@5.70.0
└─┬ terser-webpack-plugin@5.3.1
└── webpack@5.70.0 deduped

OK, I’ve made a little progress, I just ignored the conflict and ran the production environment so now i have:

Welcome in SuttaCentral environment setup script!
You are going to be prompted for a bunch of information.
If you want to set the value to the random one enter ‘R’.
You will be prompted back with the generated value. eg.
< R

By default
If you want to leave current value just leave the answer blank.


  • Current value:
  • New value (empty to keep old value, R for random):

SHould I just generate randoms for all questions? I don’t understand what I am supposed to be doing here?

1 Like

It’s been a while since I set up from scratch!

But yes, just put in random.

1 Like

thanks Bhante! I am going to make this my project for the weekend :slight_smile:

1 Like

Well let us know how it goes. You can tag @ HongDa in on this conversation if there are any issues.

We don’t always keep the README up to date, so do let us know if there are any things that need fixing.

1 Like

Thanks again Bhante! I got much further than I thought I might this morning, so fingers crossed if i can figure out this webpack/copy-webpack-plugin thing I will be right!


Ok, so another update, I have gotten even further but am still running into problems:

12: Load blurbs from sc_bilara_data
8809 blurbs added or updated
Traceback (most recent call last):
File “”, line 93, in
File “/usr/local/lib/python3.7/site-packages/flask_script/”, line 417, in run
result = self.handle(argv[0], argv[1:])
File “/usr/local/lib/python3.7/site-packages/flask_script/”, line 386, in handle
res = handle(*args, **config)
File “/usr/local/lib/python3.7/site-packages/flask_script/”, line 216, in call
return*args, **kwargs)
File “”, line 48, in load_data
File “/opt/sc/sc-flask/server/data_loader/”, line 402, in run
sc_bilara_data.load_blurbs(db, sc_bilara_data_dir)
File “/opt/sc/sc-flask/server/data_loader/”, line 41, in load_blurbs
File “/usr/local/lib/python3.7/site-packages/arango/”, line 2245, in import_bulk
return self._execute(request, response_handler)
File “/usr/local/lib/python3.7/site-packages/arango/”, line 66, in _execute
return self._executor.execute(request, response_handler)
File “/usr/local/lib/python3.7/site-packages/arango/”, line 82, in execute
return response_handler(resp)
File “/usr/local/lib/python3.7/site-packages/arango/”, line 2242, in response_handler
raise DocumentInsertError(resp, request)
arango.exceptions.DocumentInsertError: [HTTP 409][ERR 1210] unique constraint violated
make: *** [Makefile:78: load-data] Error 1

Anyone have any ideas? @HongDa ?

1 Like

Oh my oh my!!!


So congrats I guess!

1 Like

Well, in the end I was unable to get the site actually serving me the suttas, but I got heaps further along than I have ever managed before, and I am learning a heap about linux, git, docker, flask, python and all sorts of things so I will take a bit of a pause, regroup and give it another go next weekend.


Probably that involves loading the data to ArangoDB. make load-data should do it, unless there are some setup stages that are incomplete.

1 Like

Yes @sujato I’m pretty sure the error above is the problem, that occurs when I run make load data :slight_smile: but I will have another crack later.

OK, a little update:

I’m so excited! I cannot believe how many stupid things I did to prevent myself from actually setting up this environment!! did not have an ssh key, did not give docker group or user permissions, did not put the folder in opt, sudo’d every command, thought that I needed to go to sc-frontend’s container IP and port so wasn’t even looking at local-host, ran make run-dev immediately after running make-preview-env, and then immediately ran make load-data! I think I even ran a couple of the makes in concurrent terminals after mistakenly thinking a process had stalled… sheesh…

Anyway, I guess there where quite a few cobwebs to blow off after not being in web development for more than ten years, but I am very very happy to have gotten this far.

Now I will start to explore Arango and getting my head around elasticsearch and arangosearch and see if I can tinker on my local machine and get familiar!

The reason the baskets weren’t there was because I was looking at the wrong IP!

Localhost serving up a discourse!!

“Under the hood”


1 Like

Well, as I was reading this comment, I lifted up my fresh morning cup of coffee to take the first sip; my thumb slipped a little and hot coffee spilled all over me. So yeah.

That’s awesome. Our engineers love ArangoDB. It’s super-well engineered, robust, and highly capable.

FYI, we aim to replace elasticsearch with ArangoDB search as soon as we can. That will massively reduce our dependencies, and enable us to do kinds of searches that are currently impossible. For example, since ADB understands “segments”, we could search for instances where “dhamma” is translated as “thing”. That’s just not possible in elastic.


Sounds extremely cool! :snowman_with_snow:

You can already do this on Bilara you know …

Technically it is “segments where ‘thing’ appears in translation and ‘dhamma’ appears in root”. But practically it’ll usually give you instances where dhamma is translated as thing.


Indeed, that’s true.