gyp info it worked if it ends with ok
gyp verb cli [ 'node',
gyp verb cli 'C:\\Users\\ashamsut\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'configure',
gyp verb cli '--verbose' ]
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp verb command configure []
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:\Python27\python.EXE
gyp verb check python version `python -c "import platform; print(platform.python_version());"` returned: "2.7.0\r\n"
gyp verb get node dir no --target version specified, falling back to host node version: v0.10.35
gyp verb command install [ 'v0.10.35' ]
gyp verb install input version string "v0.10.35"
gyp verb install installing version: 0.10.35
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 0.10.35
gyp verb ensuring nodedir is created C:\Users\ashamsut\.node-gyp\0.10.35
gyp verb created nodedir C:\Users\ashamsut\.node-gyp\0.10.35
gyp http GET http://nodejs.org/dist/v0.10.35/node-v0.10.35.tar.gz
gyp verb download using proxy url: "http://localhost:3128"
gyp http 403 http://nodejs.org/dist/v0.10.35/node-v0.10.35.tar.gz
gyp WARN install got an error, rolling back install
gyp verb command remove [ '0.10.35' ]
gyp verb remove using node-gyp dir: C:\Users\ashamsut\.node-gyp
gyp verb remove removing target version: 0.10.35
gyp verb remove removing development files for version: 0.10.35
gyp ERR! configure error
gyp ERR! stack Error: 403 status code downloading tarball
gyp ERR! stack at Request.<anonymous> (C:\Users\ashamsut\AppData\Roaming\npm\node_modules\node-gyp\lib\install.js:24
6:14)
gyp ERR! stack at Request.emit (events.js:117:20)
gyp ERR! stack at Request.onRequestResponse (C:\Users\ashamsut\AppData\Roaming\npm\node_modules\node-gyp\node_module
s\request\request.js:1156:10)
gyp ERR! stack at ClientRequest.emit (events.js:95:17)
gyp ERR! stack at HTTPParser.parserOnIncomingClient (http.js:1693:21)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:122:23)
gyp ERR! stack at Socket.socketOnData (http.js:1588:20)
gyp ERR! stack at TCP.onread (net.js:528:27)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Users\\ashamsut\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configur
e" "--verbose"
gyp ERR! cwd C:\
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
Question. Why node-gyp is trying to donwload node-v0.10.35.tar.gz though it's already installed and how can I avoid downloading?
Thanks!
node-gyp needs access to development headers of node, some of them might not be available when installing node or iojs binary. Think of it as "Node SDK" :)
To avoid downloading take note of the location where node-gyp is storing those files. On UNIX this it is $HOME/.node-gyp. On Windows it seems to be the same (C:\Users\ashamsut\.node-gyp). To avoid download, I have downloaded all versions of the engines I support and unpacked them into the .node-gyp directory under $HOME (or %HOME%).
Here is the list of all directories which I have currently accumulated:
https://gist.github.com/saper/a833819e0af9aae6a179
If you have everything under your .node-gyp directory, node-gyp will no longer download anything, unless you upgrade your engine (like for example you probably need to upgrade your node to 0.10.38 to fix some security issues).
Ah, I forgot: every directory with a version number needs to have an installVersion file. In my case it contains just undefined.
Thanks!
Since I came here from googling the issue - in 2019, installVersion cannot hold undefined, it has to be 9. Apart from that, it still works as described.
Most helpful comment
node-gypneeds access to development headers of node, some of them might not be available when installingnodeoriojsbinary. Think of it as "Node SDK" :)To avoid downloading take note of the location where
node-gypis storing those files. On UNIX this it is$HOME/.node-gyp. On Windows it seems to be the same (C:\Users\ashamsut\.node-gyp). To avoid download, I have downloaded all versions of the engines I support and unpacked them into the.node-gypdirectory under$HOME(or %HOME%).Here is the list of all directories which I have currently accumulated:
https://gist.github.com/saper/a833819e0af9aae6a179
If you have everything under your
.node-gypdirectory,node-gypwill no longer download anything, unless you upgrade your engine (like for example you probably need to upgrade your node to 0.10.38 to fix some security issues).