Npm installation error Installation error phantomjs@1.9.12 script

I get this error when I try to do npm install ... I am amazed at this for almost 4 days ... please can someone help me ...

npm ERR! Windows_NT 6.1.7601 npm ERR! argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Users\\Username\\AppData\\Roaming\\npm\\node_modules\\n pm\\bin\\npm-cli.js" "install" npm ERR! node v0.10.33 npm ERR! npm v2.1.5 npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! phantomjs@1.9.12 install: `node install.js` npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the phantomjs@1.9.12 install script. npm ERR! This is most likely a problem with the phantomjs package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node install.js npm ERR! You can get their info via: npm ERR! npm owner ls phantomjs npm ERR! There is likely additional logging output above. 
+7
npm
source share
1 answer

I had the same problem on windows. To fix this, I took the following steps:

  • Install the latest version of phantomjs (currently phantomjs-1.9.8-windows) locally, by downloading and unpacking. I had a previous version that was not compatible with the npm phantomjs package.
  • Update the environment variable to point to the latest version of phantomjs.exe ( PHANTOMJS_HOME ).
  • Exit and restart the Windows prompt or shell to recognize the variable.
  • Now npm install or in particular npm install phantomjs@1.9.12 should work correctly.

You can test your local phantomjs executable installation with where phantomjs and phantomjs -v from the git bash shell.

+5
source share

All Articles