Topic on Talk:Parsoid

Cannot find module '…/parsoid/node_modules/lib/index.js'

2
Summary by Arlolra

User disappeared

Rainer Klute (talkcontribs)

I installed Parsoid following the instructions on Parsoid/Developer Setup, using the “clone the mediawiki/services/parsoid/deploy repository” variant and the following commands:

cd /home/parsoid

git clone --recursive https://gerrit.wikimedia.org/r/mediawiki/services/parsoid/deploy .

npm install

chown -R parsoid.parsoid .

However, when starting Parsoid (after having created the src/config.yaml file) with

/usr/bin/node /home/parsoid/src/bin/server.js

I get a “cannot find module” error, because /data/home/parsoid/node_modules/lib/index.js is missing. In fact, there is no /data/home/parsoid/node_modules/lib directory at all.

So, why did the installation procedure not create that lib directory, and what can I do now? Thanks for your help!

Oh, by the way, /home is a symlink to /data/home, if that matters.

Arlolra (talkcontribs)

If you cloned the deploy repo, there was no need to npm install since that already provides all the dependencies.

The path that it should be looking for is /data/home/parsoid/lib/index.js, without the node_modules/ in the middle.

What value do you have in your config.yaml for the module? Maybe add a ../ before it.