bio-ontology-research-group / aberowl-meta

Install script and sub-directories for AberOWL
http://aber-owl.net/
Apache License 2.0
2 stars 1 forks source link

On front-end start on Ubuntu Desktop 15.10: Error: Cannot find module 'phantomjs' #6

Open Zsar opened 8 years ago

Zsar commented 8 years ago

Executing bin/www:

zsar@IMISE-Testrechner:~/aberowl-meta/aberowl-web$ bin/www

module.js:340
    throw err;
          ^
Error: Cannot find module 'phantomjs'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/zsar/aberowl-meta/aberowl-web/app.js:14:17)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)```

Checking via apt list phantomjs:

Listing... Done
phantomjs/wily,now 1.9.0-1 amd64 [installed]

Probably related to this comment.

Zsar commented 8 years ago

The pointers given by Robbie1977 are completely necessary to circumvent this problem.

This means that at least the ReadMe is out of date (still/again?).

However, it also seems to be rather vexing that a system-wide installation of phantomjs is not recognised by AberOWL and instead a local instance has to be provided via /aberowl-meta/aberowl-web/npm install phantomjs - as far as I can see (not a Linux expert and never used phantomjs before), this really does nothing but install phantomjs again, but in a subfolder of /aberowl-meta/aberowl-web/.

I'll try out later, if I can get it to work by merely symlinking to the instance installed by apt-get.

When updating the ReadMe, mayhap also correct this line: sudo apt-get install node nodejs npm As you reference Ubuntu in the paragraph immediately above, this should read instead: sudo apt-get install nodejs nodejs-legacy npm

Another obsolete paragraph is the one immediately below, referencing the discontinued GVM tool. References to it should be replaced by those to its successor sdkman. The linked page has recently been updated to refer to sdkman instead of gvm, so the link itself may stay.

Finally, the ReadMe still does not include the mandatory parameter to AberOWLServer.groovy in the first paragraph of section Running.

reality commented 8 years ago

PhantomJS and xmldom now automatically installed by install script as per changes in https://github.com/bio-ontology-research-group/aberowl-orepo/commit/005ec92bb8b3f128ca10f425889250178938ce24

Have also updated README with respect to your comments.

When you say that you installed phantomjs globally, did you do this with the npm install --global function, or install a system package? It should be able to pick up globally installed npm modules without a problem - I believe the install location is /usr/local/lib/node_modules on Ubuntu. Is the global phantomjs package you are trying to use in this directory?

Zsar commented 8 years ago

I had installed phantomjs via sudo apt-get install phantomjs. In the folder /usr/local/lib/ there are three subfolders named after python versions, but none called node_modules.

Querying apt via apt list phantomjs shows phantomjs/Wily,now 1.9.0-1 amd64 [installed].

reality commented 8 years ago

From what I understand, the phantomjs software suite and the phantomjs node module are seperate pieces of software (the node package is an interface to it)