Failed at the [email protected] install script 'node install.js'

As a temporary work around I am able to get it installed by using --ignore-scripts

npm install [email protected] --ignore-scripts

I also logged an issue in the github repo for the same

https://github.com/Medium/phantomjs/issues/649

edited

This issue was part of the build process script I was using and it does a npm clean and install everytime with a bunch of other things .So this issue appears many times in the same machine where we automated tests using phantomjs. I got some time to look into this issue and it seems my corporate proxy is blocking the download from https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-windows.zip. I knew this before and had manually installed phantomjs binary and added to system path but the npm install still trying to download locally as showing in the log below.

Considering PhantomJS found at C:\npm\phantomjs-2.1.1-windows\bin\phantomjs.EXE
Looks like an `npm install -g` on windows; skipping installed version.

My corporate proxy was blocking all the phantomjs CDN urls as well (https://www.npmjs.com/package/phantomjs)

The work around I used was to get the phantomjs-2.1.1-windows.zip and copy it to the C:\Users\<username>\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip and that resolved the issue with the build script.If someone cleans the temp directory,issue will come back. Even this is a work around but the corporate proxy cannot be unblocked for obvious reasons :)

Hope this helps someone!