Topic on Talk:Parsoid

Parsoid doesn't run: "cannot find module index.js"

4
Summary by Arlolra

Parsoid/JS is no longer supported

AID-PMBD (talkcontribs)

Hello Everyone,

Setup:

Mediawiki Version: 1.31

Node.js Version: 10.22.0

Parsoid Version: 0.9.0 from https://releases.wikimedia.org/parsoid/

OS: Ubuntu 18.04

I've been trying to get Parsoid and Visual Editor running for a while now.

Error

Visual Editor gives me this Error when I try to edit a page:

"Fehler beim Laden der Daten vom Server: apierror-visualeditor-docserver-http-error: (curl error: 7) Couldn't connect to server"

Also the Version page of my Wiki doesn't list Parsoid at all. I therefore concluded that Parsoid isn't running properly.

When I try to run Parsoid manually with the command: node bin/server.js

I get this error: https://pastebin.com/q7g2p3DY

When I try to start Parsoid with "sudo service parsoid restart" I get the error: "Failed to restart parsoid.service: Unit parsoid.service not found".

Parsoid Installation workflow:

wget https://releases.wikimedia.org/parsoid/parsoid_0.9.0all_all.deb

sudo dpkg -i parsoid_0.9.0all_all.deb

sudo apt-get install -f

Then I edited the config.yaml in /etc/mediawiki/parsoid adding my Api adress.

I did the same with the config.yaml in /usr/lib/parsoid/src.

I can curl my Api with "curl http://192.168.178.XX/XXXX/api.php"

Does anyone have an idea what I can do to makes this configuration work? Unfortunately I need some extensions for my project that are not supported beyond MW 1.31, so I can't just update to the latest version.

Cheers

AID-PMBD

Arlolra (talkcontribs)
AID-PMBD (talkcontribs)

Thank you for the reply.


I reinstalled parsoid following the instructions given in the post you linked me to, but now I get a different error when trying to run it:


Installation Workflow:

1.       cd /opt

2.       Sudo git clone --depth 1 --branch v0.9.0 https://gerrit.wikimedia.org/r/p/mediawiki/services/parsoid parsoid

3.       Config.yaml in cd /opt/parsoid edited


Error:

When using "node bin/server.js"


internal/modules/cjs/loader.js:638

   throw err;

   ^

Error: Cannot find module 'service-runner'

   at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)

   at Function.Module._load (internal/modules/cjs/loader.js:562:25)

   at Module.require (internal/modules/cjs/loader.js:692:17)

   at require (internal/modules/cjs/helpers.js:25:18)

   at Object.<anonymous> (/opt/parsoid/bin/server.js:5:21)

   at Module._compile (internal/modules/cjs/loader.js:778:30)

   at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

   at Module.load (internal/modules/cjs/loader.js:653:32)

   at tryModuleLoad (internal/modules/cjs/loader.js:593:12)

   at Function.Module._load (internal/modules/cjs/loader.js:585:3)


When using "sudo service parsoid start"


Failed to start parsoid.service: Unit parsoid.service not found.


Any idea as to where I went wrong this time?


Cheers

AID-PMBD

AID-PMBD (talkcontribs)

If someone has any idea as to what I could do to fix the issue it would be appreciated.


Cheers

AID-PMBD