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
/usr/share/doc/nodejs/README.Debian

npm ERR! weird error 1
npm ERR! not ok code 0
root@jason-VirtualBox:/home/jason#

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

Comments

Leave a comment

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