PhantomJS Install Error Via NodeJS on Ubuntu 14.04

When attempting to install PhantomJS via NodeJS, I got the following error:

> phantomjs@1.9.17 install /usr/local/lib/node_modules/phantomjs
> node install.js

npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read

npm ERR! weird error 1
npm ERR! not ok code 0

Luckily, I was able to follow this StackOverflow answer, running this command (e.g. with sudo) :

apt-get install nodejs-legacy

After running this, I was able to successfully install PhantomJS with:

npm install -g phantomjs


Leave a comment

What color are green eyes? (spam prevention)
Code under MIT License unless otherwise indicated.
© 2020, Downranked, LLC.