Before everything was ok,but I changed to my server and execute this:
elearn$ node-gyp configure
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp http GET http://nodejs.org/dist/v0.10.6/node-v0.10.6.tar.gz
gyp http 200 http://nodejs.org/dist/v0.10.6/node-v0.10.6.tar.gz
and stopped here,I dont know what is the problem? Is it a bug?Or something I did wrong?
Can you show me the output with node-gyp configure --verbose?
same problem for me with windows 64-bit; node v.0.8.2;
Here are the steps that I followed:
Then,
npm install node-gyp
Here is the command I executed:
node-gyp configure --python v2.7.3 --verbose
For npm, I've setup my http-proxy & https-proxy. Here is what my "npm config list" reads. Do I have to do anything specific to node-gyp?:
; cli configs
; userconfig C:\Users\myuser\.npmrc
http-proxy = "http://myuser:mypwd@myhost:8080"
https-proxy = "http://myuser:mypwd@myhost:8080/"
proxy = "http://myuser:mypwd@myhost:8080/"
Here is the output. It would be great if you could help to fix this, at the earliest:
gyp info it worked if it ends with ok
gyp verb cli [ 'node',
gyp verb cli 'C:\\Users\\mnagasam\\AppData\\Roaming\\npm\\node_modules\\node-g
yp\\bin\\node-gyp.js',
gyp verb cli 'configure',
gyp verb cli '--python',
gyp verb cli 'v2.7.3',
gyp verb cli '--verbose' ]
gyp info using [email protected]
gyp info using [email protected] | win32 | ia32
gyp verb command configure []
gyp verb check python checking for Python executable "v2.7.3" in the PATH
gyp verb `which` failed for `%s` Error: not found: v2.7.3
gyp verb `which` failed for `%s` at F (C:\Users\mnagasam\AppData\Roaming\npm
\node_modules\node-gyp\node_modules\which\which.js:43:28)
gyp verb `which` failed for `%s` at E (C:\Users\mnagasam\AppData\Roaming\npm
\node_modules\node-gyp\node_modules\which\which.js:46:29)
gyp verb `which` failed for `%s` at C:\Users\mnagasam\AppData\Roaming\npm\no
de_modules\node-gyp\node_modules\which\which.js:57:16
gyp verb `which` failed for `%s` at Object.oncomplete (fs.js:297:15)
gyp verb `which` failed for `%s` v2.7.3 [Error: not found: v2.7.3]
gyp verb could not find "v2.7.3". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp verb check python version `C:\Python27\python.exe -c "import platform; print
(platform.python_version());"` returned: "2.7.3\r\n"
gyp verb get node dir no --target version specified, falling back to host node v
ersion: v0.8.2
gyp verb command install [ 'v0.8.2' ]
gyp verb install input version string "v0.8.2"
gyp verb installing legacy version? false
gyp verb install installing version: 0.8.2
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 0.8.2
gyp verb ensuring nodedir is created C:\Users\mnagasam\.node-gyp\0.8.2
gyp verb created nodedir C:\Users\mnagasam\.node-gyp\0.8.2
gyp http GET http://nodejs.org/dist/v0.8.2/node-v0.8.2.tar.gz
gyp WARN install got an error, rolling back install
gyp verb command remove [ '0.8.2' ]
gyp verb remove using node-gyp dir: C:\Users\mnagasam\.node-gyp
gyp verb remove removing target version: 0.8.2
gyp verb remove removing development files for version: 0.8.2
gyp ERR! configure error
gyp ERR! stack Error: connect ETIMEDOUT
gyp ERR! stack at errnoException (net.js:776:11)
gyp ERR! stack at Object.afterConnect [as oncomplete] (net.js:767:19)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Users\\mnagasam\\AppData\\Roaming\\npm\\node_module
s\\node-gyp\\bin\\node-gyp.js" "configure" "--python" "v2.7.3" "--verbose"
gyp ERR! cwd c:\Users\mnagasam\Desktop\Muthu\PurgeMonitor
gyp ERR! node -v v0.8.2
gyp ERR! node-gyp -v v0.10.0
gyp ERR! not ok
the installation is successful when i used the "--proxy=http://myproxyurl/"
Looks like a connectivity problem solved by needing a web proxy. Not an issue with node-gyp.
Same thing for me, it should pick up the proxy no?
It also works for me when adding the proxy. cannot understand why node-gyp doesn't apply npm's proxy setting...
Similar problem, sorry to bump the issue.
We're using d3.js, and a dependency of d3.js (d3 -> jsdom -> contextify) uses node-gyp to compile some native module. The problem we have is that when node-gyp tries to download node, it doesn't pass the proxy. npm passes the proxy without a problem since we configured it properly, exactly as @muthunagu100 said above. So npm install works fine.
As the node-gyp rebuild command is hardcoded in contextify's package.json, I don't know how to pass the proxy option. I can't even monkey-patch the file by hand since the dependency is too deep and we're building with Jenkins, which starts the build with a fresh npm install.
Does anyone know how to specify a proxy for node-gyp when one is not able to pass the --proxy option ? Thanks in advance.
I'm reading the source code of node-gyp to find whether there's a environment variable to specify the proxy...
A question : would you accept a pull request that make node-gyp use npm's proxy settings ? I may try if it doesn't involve C/C++ code.
Ok, seems like this code already exists, in https://github.com/TooTallNate/node-gyp/blob/master/lib/install.js#L131
// basic support for a proxy server
var proxyUrl = gyp.opts.proxy
|| process.env.http_proxy
|| process.env.HTTP_PROXY
|| process.env.npm_config_proxy
Ok, the problem for us was maven (through jenkins). We're using the "ant" maven plugin to launch npm install, and apparently it doesn't pass properly the environment to npm, including the proxy settings. Bypassing maven by executing npm install in a jenkins "pre step" solved the problem for us.
Sorry for the issue pollution. Hoping this will help someone else !
Most helpful comment
the installation is successful when i used the "--proxy=http://myproxyurl/"