Jump to navigation Jump to search

About this board

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

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 .

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.

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

Parsoid service not found after install on Ubuntu 16.04

David Gleason (talkcontribs)

I have been having no luck getting parsoid working. I have nodejs v10.16, and if I follow all the install instructions on the "Parsoid/Setup" page it seems to install fine but if I then do sudo service parsoid status it says service not found. Anyone have any ideas on how to get this working? Thanks, David

David Gleason (talkcontribs)
David Gleason (talkcontribs)

(p.s. should have mentioned I am running Ubuntu 16.04 which uses systemd instead of upstart.)

Reply to "Parsoid service not found after install on Ubuntu 16.04"

Problems with installing Parsoid

2A02:908:954:FB00:7D4A:31B1:11E5:290C (talkcontribs)

Hello everybody,

Can anyone of you provide me with a simple guide for installing Parsoid? I would like to use the visual editor, but I just do not get Parsoid installed. The explanations found on the Internet are very complicated. Media Wiki runs on an external server.

Thank your for your support.

Best regards

Philipp (talkcontribs)

I have the same problem. I can not set the external server url. Do you need any installation?

Reply to "Problems with installing Parsoid" (talkcontribs)

I am at a loss here at how to get this up and running with Visual Editor. I will literally pay someone to help me get it running. In this day and age, I have no idea why all of the devs involved in this project need to make something so incredibly complicated to setup. Really super unnecessary, someone should make a windows based installer package for parsoid and visual editor and whatever else is needed to make this so much easier.

Anywho, any takers on getting paid to make this clunky software work would be much appreciated!

please contact me ASAP!

Ciencia Al Poder (talkcontribs)
Reply to "Server 2019...."

Pagebanner template at Wikivoyage

Summary by Whatamidoing (WMF)
Whatamidoing (WMF) (talkcontribs)


I've noticed that voy:en:Template:Pagebanner has a strange behavior in the visual editor. Inspired by @SSastry (WMF)'s excellent explanation of the '''foo {{1x|'''a'''}} bar''' parsing problem, I wanted to ask if there might be something wrong/unbalanced about the template code.

The behavior that I see is that if the wikitext says:


First sentence

then the first sentence is treated as a complex transclusion of the two parts. See as an example of this. However, if there is a blank line between the first sentence and the pagebanner template, then it is not treated as a complex transclusion, and the first line is (properly/as expected) separate from the template. What do you think is wrong here?

SSastry (WMF) (talkcontribs)

You are on the right track. :-)

The reason why Parsoid expands the scope of the template is because parts of its output is combined with that sentence to create a paragraph.

In this case, it seems to be because the pagebanner template uses the <indicator> extension and Parsoid seems to think that it should be wrapped in a paragraph. That is more likely a problem with Parsoid's interpretation of the <indicator> extension's output and we may be able to fix that. Can you file a bug for us? Thanks!

Glad you found the explanation useful.

SSastry (WMF) (talkcontribs)

There is another (un)related issue that Parsoid should fix as well. If you look at, you see that the banner is missing. This is another issue with Parsoid's handling of the indicator extension. This is likely to get addressed once Parsoid is ported with PHP and integrated with core.

Whatamidoing (WMF) (talkcontribs)

I filed one bug mentioning both, since it sounds like the second is a problem that will automagically disappear without requiring any specific effort. If you want them split, please reply here. I stopped watching this page after the Tidy/Remex change was completely wrapped up, but I am subscribed to this thread (and of course you are welcome to ping me in any conversation on any wiki).

SSastry (WMF) (talkcontribs)

Thanks! That bug report is good enough. We will split if required.

Parsoid is not running Ubuntu 18.10

2A0B:33C0:2:22:A4FA:7E0C:919F:30E7 (talkcontribs)

I installed the parsoid as described in the official doc. But it is not running and throws that error:

1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]

2 info using npm@5.8.0

3 info using node@v8.11.4

4 verbose run-script [ 'prestart', 'start', 'poststart' ]

5 info lifecycle parsoid@0.10.0~prestart: parsoid@0.10.0

6 info lifecycle parsoid@0.10.0~start: parsoid@0.10.0

7 verbose lifecycle parsoid@0.10.0~start: unsafe-perm in lifecycle true

8 verbose lifecycle parsoid@0.10.0~start: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/lib/parsoid/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

9 verbose lifecycle parsoid@0.10.0~start: CWD: /usr/lib/parsoid

10 silly lifecycle parsoid@0.10.0~start: Args: [ '-c', 'service-runner' ]

11 silly lifecycle parsoid@0.10.0~start: Returned: code: 126  signal: null

12 info lifecycle parsoid@0.10.0~start: Failed to exec start script

13 verbose stack Error: parsoid@0.10.0 start: `service-runner`

13 verbose stack Exit status 126

13 verbose stack     at EventEmitter.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/index.js:283:16)

13 verbose stack     at emitTwo (events.js:126:13)

13 verbose stack     at EventEmitter.emit (events.js:214:7)

13 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)

13 verbose stack     at emitTwo (events.js:126:13)

13 verbose stack     at ChildProcess.emit (events.js:214:7)

13 verbose stack     at maybeClose (internal/child_process.js:925:16)

13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

14 verbose pkgid parsoid@0.10.0

15 verbose cwd /usr/lib/parsoid

16 verbose Linux 4.18.0-16-generic

17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"

18 verbose node v8.11.4

19 verbose npm  v5.8.0

20 error code ELIFECYCLE

21 error errno 126

22 error parsoid@0.10.0 start: `service-runner`

22 error Exit status 126

23 error Failed at the parsoid@0.10.0 start script.

23 error This is probably not a problem with npm. There is likely additional logging output above.

24 verbose exit [ 126, true ]

does anybody have an idea how to fix it?

Arlolra (talkcontribs)

The exit status 126 is probably a permission error when trying to execute service-runner.

2A0B:33C0:2:22:A4FA:7E0C:919F:30E7 (talkcontribs)

Thanks a lot. Seems like the service-runner.js caused the problems.

Installation of Parsoid in a Windows Server Environment Without Internet Access

Summary by Mbrooksham

Downloaded the files via npm onto a machine with internet, then simply copied them over.

Mbrooksham (talkcontribs)

Hi all,

Looking to install Parsoid in a Windows Server Environment without an internet connection.

Can anyone give me some advice/point me in the direction of some documentation of how to accomplish this?


Mbrooksham (talkcontribs)

Working on MediaWiki vers 1.32 by the way, php 7.1.26

installing on machine that is not internet facing

Summary by Mbrooksham

Downloaded the files via npm onto a machine with internet, then simply copied them over.

Squeak24 (talkcontribs)


I am trying to install Parsoid on a machine that is not facing the internet, it is on a firewalled internal network with no access to the outside world.

So, the question is, is there anyway to install parsoid onto a server that is not internet facing? If so, how?

Any help is appreciated.


Squeak24 (talkcontribs)
SSastry (WMF) (talkcontribs)

All Parsoid needs is a config to point it to a wiki. It can be an internal / local wiki. In that case, it won't need to access the internet. You can set up the wiki config via config.yaml. See Parsoid/Setup#Configuration

Arlolra (talkcontribs)
Mbrooksham (talkcontribs)

Hi Squeak24,

Can you give me some information about how you performed your install in an offline environment? I'm not that familar with npm (talkcontribs)
Spas.Z.Spasov (talkcontribs)

I'm experiencing the same problem on Ubuntu. I've setup Parsoid on another server 2 weeks ago and everything went fine then.

At the moment I've applied the following workaround to install Parsoid 0.10:

sudo dpkg -i parsoid_0.10.0all_all.deb

In addition:

  • Here is how to test whether the service listen after the installation:
sudo systemctl status parsoid.service
sudo lsof -i -n -P | grep ':8142'
sudo netstat -peanut | grep ':8142'
Reply to "pgp keys still valid/existing ?"
Tealk (talkcontribs) (talkcontribs)

I have disable the "domain: '' # optional" line and now it run fine, strange, the last time i have enable it

Reply to "Invalid domain"