Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm install error Failed at the [email protected] install script

Tags:

npm

I am getting this error when am trying to do npm install...am struck with this nearly for 4 days...please can someone help me out...

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! [email protected] install: `node install.js`  
npm ERR! spawn ENOENT  
npm ERR! 
npm ERR! Failed at the [email protected] 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.
like image 820
user4196837 Avatar asked Oct 30 '14 04:10

user4196837


1 Answers

I had the exact same issue on Windows. To fix it, I took the following steps:

  1. Install the latest version of phantomjs (currently, phantomjs-1.9.8-windows) locally, by downloading and unziping. I had a previous version which was not compatible with phantomjs npm package.
  2. Update your environment variable to point to latest version of phantomjs.exe (PHANTOMJS_HOME).
  3. Exit and restart windows prompt or shell to recognize variable.
  4. Now, npm install or specifically, npm install [email protected] should work correctly.

You can test your local phantomjs executable install with a where phantomjs and phantomjs -v from a git bash shell or command prompt.

like image 59
Gary Stafford Avatar answered Sep 20 '22 13:09

Gary Stafford