Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-gyp rebuild error (as part of PouchDB) #86

Closed
DrYSG opened this issue Dec 30, 2013 · 13 comments
Closed

node-gyp rebuild error (as part of PouchDB) #86

DrYSG opened this issue Dec 30, 2013 · 13 comments

Comments

@DrYSG
Copy link

DrYSG commented Dec 30, 2013

I got this error on a Windows7 machine with the latest version of node-gyp for 64 bit windows machines.

G:\wwwroot\NodeWork\node_modules\pouchdb\node_modules\level\node_modules\leveldown>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild
npm http GET http://registry.npmjs.org/pouchdb
npm http 200 http://registry.npmjs.org/pouchdb
npm http GET http://registry.npmjs.org/pouchdb/-/pouchdb-1.0.0.tgz
npm http 200 http://registry.npmjs.org/pouchdb/-/pouchdb-1.0.0.tgz
npm http GET http://registry.npmjs.org/pouchdb-mapreduce/0.2.0
npm http GET http://registry.npmjs.org/level
npm http 200 http://registry.npmjs.org/pouchdb-mapreduce/0.2.0
npm http 200 http://registry.npmjs.org/level
npm http GET http://registry.npmjs.org/pouchdb-mapreduce/-/pouchdb-mapreduce-0.2.0.tgz
npm http GET http://registry.npmjs.org/level/-/level-0.18.0.tgz
npm http 200 http://registry.npmjs.org/pouchdb-mapreduce/-/pouchdb-mapreduce-0.2.0.tgz
npm http 200 http://registry.npmjs.org/level/-/level-0.18.0.tgz
npm http GET http://registry.npmjs.org/request
npm http 200 http://registry.npmjs.org/request
npm http GET http://registry.npmjs.org/request/-/request-2.28.0.tgz
npm http 200 http://registry.npmjs.org/request/-/request-2.28.0.tgz
npm http GET http://registry.npmjs.org/pouchdb-collate/0.1.0
npm http GET http://registry.npmjs.org/level-packager
npm http GET http://registry.npmjs.org/tunnel-agent
npm http GET http://registry.npmjs.org/aws-sign2
npm http GET http://registry.npmjs.org/oauth-sign
npm http GET http://registry.npmjs.org/json-stringify-safe
npm http GET http://registry.npmjs.org/http-signature
npm http GET http://registry.npmjs.org/node-uuid
npm http 200 http://registry.npmjs.org/pouchdb-collate/0.1.0
npm http GET http://registry.npmjs.org/qs
npm http 200 http://registry.npmjs.org/aws-sign2
npm http 200 http://registry.npmjs.org/oauth-sign
npm http 200 http://registry.npmjs.org/tunnel-agent
npm http 200 http://registry.npmjs.org/json-stringify-safe
npm http 200 http://registry.npmjs.org/level-packager
npm http GET http://registry.npmjs.org/leveldown
npm http GET http://registry.npmjs.org/form-data
npm http GET http://registry.npmjs.org/tough-cookie
npm http GET http://registry.npmjs.org/mime
npm http 200 http://registry.npmjs.org/http-signature
npm http 200 http://registry.npmjs.org/node-uuid
npm http 200 http://registry.npmjs.org/form-data
npm http 200 http://registry.npmjs.org/qs
npm http 200 http://registry.npmjs.org/mime
npm http 200 http://registry.npmjs.org/tough-cookie
npm http GET http://registry.npmjs.org/forever-agent
npm http GET http://registry.npmjs.org/pouchdb-collate/-/pouchdb-collate-0.1.0.tgz
npm http 200 http://registry.npmjs.org/forever-agent
npm http GET http://registry.npmjs.org/level-packager/-/level-packager-0.18.0.tgz
npm http 200 http://registry.npmjs.org/pouchdb-collate/-/pouchdb-collate-0.1.0.tgz
npm http 200 http://registry.npmjs.org/leveldown
npm http 200 http://registry.npmjs.org/level-packager/-/level-packager-0.18.0.tgz
npm http GET http://registry.npmjs.org/leveldown/-/leveldown-0.10.2.tgz
npm http GET http://registry.npmjs.org/hawk
npm http 200 http://registry.npmjs.org/leveldown/-/leveldown-0.10.2.tgz
npm http 200 http://registry.npmjs.org/hawk
npm http GET http://registry.npmjs.org/combined-stream
npm http 200 http://registry.npmjs.org/combined-stream
npm http GET http://registry.npmjs.org/punycode
npm http 200 http://registry.npmjs.org/punycode
npm http GET http://registry.npmjs.org/async
npm http 200 http://registry.npmjs.org/async
npm http GET http://registry.npmjs.org/ctype/0.5.2
npm http GET http://registry.npmjs.org/asn1/0.1.11
npm http GET http://registry.npmjs.org/assert-plus/0.1.2
npm http 200 http://registry.npmjs.org/ctype/0.5.2
npm http 200 http://registry.npmjs.org/asn1/0.1.11
npm http GET http://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz
npm http 200 http://registry.npmjs.org/assert-plus/0.1.2
npm http GET http://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz
npm http 200 http://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz
npm http 200 http://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz
npm http GET http://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz
npm http 200 http://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz
npm http GET http://registry.npmjs.org/sntp
npm http GET http://registry.npmjs.org/boom
npm http GET http://registry.npmjs.org/cryptiles
npm http GET http://registry.npmjs.org/hoek
npm http 200 http://registry.npmjs.org/cryptiles
npm http 200 http://registry.npmjs.org/boom
npm http 200 http://registry.npmjs.org/sntp
npm http 200 http://registry.npmjs.org/hoek
npm http GET http://registry.npmjs.org/delayed-stream/0.0.5
npm http 200 http://registry.npmjs.org/delayed-stream/0.0.5
npm http GET http://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz
npm http 200 http://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz
npm http GET http://registry.npmjs.org/bindings
npm http GET http://registry.npmjs.org/nan
npm http GET http://registry.npmjs.org/levelup
npm http 200 http://registry.npmjs.org/bindings
npm http 200 http://registry.npmjs.org/nan
npm http GET http://registry.npmjs.org/nan/-/nan-0.6.0.tgz
npm http 200 http://registry.npmjs.org/levelup
npm http GET http://registry.npmjs.org/levelup/-/levelup-0.18.2.tgz
npm http 200 http://registry.npmjs.org/nan/-/nan-0.6.0.tgz
npm http 200 http://registry.npmjs.org/levelup/-/levelup-0.18.2.tgz
Traceback (most recent call last):
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 18, in
sys.exit(gyp.script_main())
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp__init__.py", line 534, in script_main
return main(sys.argv[1:])
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp__init__.py", line 527, in main
return gyp_main(args)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp__init__.py", line 503, in gyp_main
options.circular_check)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp__init__.py", line 98, in Load
generator.CalculateVariables(default_variables, params)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1798, in CalculateVariables
generator_flags.get('msvs_version', 'auto'))
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 400, in SelectVisualStudioVersion
versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 337, in _DetectVisualStudioVersions
path = _RegistryGetValue(keys[index], 'InstallDir')
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 175, in _RegistryGetValue
text = _RegistryQuery(key, value)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 157, in _RegistryQuery
text = _RegistryQueryBase('Sysnative', key, value)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 128, in _RegistryQueryBase
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "C:\Python27\lib\subprocess.py", line 703, in init
errread, errwrite) = self._get_handles(stdin, stdout, stderr)
File "C:\Python27\lib\subprocess.py", line 829, in _get_handles
p2cread = _subprocess.GetStdHandle(_subprocess.STD_INPUT_HANDLE)
WindowsError: [Error 6] The handle is invalid
gypnpm http GET http://registry.npmjs.org/xtend
npm http GET http://registry.npmjs.org/concat-stream
npm http GET http://registry.npmjs.org/errno
npm http GET http://registry.npmjs.org/deferred-leveldown
npm http GET http://registry.npmjs.org/semver
npm http GET http://registry.npmjs.org/bops
npm http GET http://registry.npmjs.org/readable-stream
npm http GET http://registry.npmjs.org/prr
npm http 200 http://registry.npmjs.org/xtend
npm http 200 http://registry.npmjs.org/concat-stream
npm http 200 http://registry.npmjs.org/errno
npm http 200 http://registry.npmjs.org/deferred-leveldown
npm http GET http://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-0.1.0.tgz
npm http 200 http://registry.npmjs.org/prr
npm http 200 http://registry.npmjs.org/semver
npm http 200 http://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-0.1.0.tgz
npm http 200 http://registry.npmjs.org/bops
npm http GET http://registry.npmjs.org/bops/-/bops-0.1.1.tgz
npm http 200 http://registry.npmjs.org/readable-stream
npm http 200 http://registry.npmjs.org/bops/-/bops-0.1.1.tgz
npm http GET http://registry.npmjs.org/bops
npm http 200 http://registry.npmjs.org/bops
npm http GET http://registry.npmjs.org/abstract-leveldown
npm http 200 http://registry.npmjs.org/abstract-leveldown
npm http GET http://registry.npmjs.org/object-keys
npm http 200 http://registry.npmjs.org/object-keys
npm http GET http://registry.npmjs.org/base64-js/0.0.2
npm http 200 http://registry.npmjs.org/base64-js/0.0.2
npm http GET http://registry.npmjs.org/base64-js/-/base64-js-0.0.2.tgz
npm http 200 http://registry.npmjs.org/base64-js/-/base64-js-0.0.2.tgz
npm http GET http://registry.npmjs.org/to-utf8/0.0.1
npm http 200 http://registry.npmjs.org/to-utf8/0.0.1
npm http GET http://registry.npmjs.org/to-utf8/-/to-utf8-0.0.1.tgz
npm http 200 http://registry.npmjs.org/to-utf8/-/to-utf8-0.0.1.tgz
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the leveldown package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls leveldown
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "pouchdb" "--save"
npm ERR! cwd G:\wwwroot\NodeWork
npm ERR! node -v v0.10.23
npm ERR! npm -v 1.3.17
npm ERR! code ELIFECYCLE
npm

@No9
Copy link
Contributor

No9 commented Dec 31, 2013

I have been having some real horrors with node-gyp recently too.
I believe it may be something to do with the python versions?
Note same line error??!

nodejs/node-gyp#370

I seem to recall I downgraded to v0.11 with something like:
npm remove -g node-gyp and npm install -g [email protected] and I could proceed.

@DrYSG
Copy link
Author

DrYSG commented Dec 31, 2013

I don't think going back is the solution. @TooTallNate has been working hard to fix some problems. We thought we had fixed this one (nodejs/node-gyp#203 ) but perhaps we are now seeing something new.

@DrYSG

@rvagg
Copy link
Member

rvagg commented Jan 1, 2014

what version of MSVS and what version of Python are you getting this with?

@DrYSG
Copy link
Author

DrYSG commented Jan 1, 2014

VS Studio Pro 2013, Version: 12.0.21005.1

Python:

C:\Users\ysg4206>python
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32

Win 7SP1, 64 bit

@rvagg
Copy link
Member

rvagg commented Jan 2, 2014

at a guess I'd say that 2013 is a bit too recent, see if you can get any feedback in the node-gyp issues about that version.

@DrYSG
Copy link
Author

DrYSG commented Jan 2, 2014

But in this issue (nodejs/node-gyp#203) @TooTallNate fixes the node-gyp problem by supporting VS2013 (see: nodejs/node-gyp#348 ), if fact he requires us to upgrade to be able to use node-gyp.

@daleharvey
Copy link

Someone else has been reporting problems, on OSX this time, not sure if related https://gist.github.com/alexduloz/8387655

Its working fine for me here

@rvagg
Copy link
Member

rvagg commented Jan 13, 2014

@daleharvey @alexduloz see https://github.com/TooTallNate/node-gyp#installation for details, basically you need the xcode commandline tools. I think these days it's a separate download you can do and just install it. If you have them then the xcode-select command is supposed to help as well; I believe you use it to set the path to the xcode tools version you want to activate.

@daleharvey
Copy link

@rvagg @alexduloz ah yeh reading back was beginning to suspect that, its come up before but I always have the tools installed, will remember to document, cheers

@explorigin
Copy link

Any hints for this one on Ubuntu 13.04? I've installed Python/GCC/make and set python 2.7 as configured in npm. But I still see this error.

npm install 
npm http GET https://registry.npmjs.org/leveldown
npm http GET https://registry.npmjs.org/exec-sync
npm http 304 https://registry.npmjs.org/leveldown
npm http 304 https://registry.npmjs.org/exec-sync
npm http GET https://registry.npmjs.org/ffi
npm http 304 https://registry.npmjs.org/ffi
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/nan

> [email protected] install /home/timothy/projects/pouchdb/node_modules/leveldown
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:340:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-30-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/timothy/projects/pouchdb/node_modules/leveldown
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok 
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/ref
npm http GET https://registry.npmjs.org/ref-struct
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/ref
npm http 304 https://registry.npmjs.org/ref-struct
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the leveldown package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls leveldown
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.13.0-30-generic
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/timothy/projects/pouchdb
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.10
npm ERR! code ELIFECYCLE
npm http GET https://registry.npmjs.org/ms

> [email protected] install /home/timothy/projects/pouchdb/node_modules/exec-sync/node_modules/ffi/node_modules/ref
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:340:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-30-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/timothy/projects/pouchdb/node_modules/exec-sync/node_modules/ffi/node_modules/ref
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok 
npm http 304 https://registry.npmjs.org/ms
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/timothy/projects/pouchdb/npm-debug.log
npm ERR! not ok code 0

@TooTallNate
Copy link

@explorigin Try sudo apt-get remove gyp. See nodejs/node-gyp#363

@explorigin
Copy link

Yep, that did it for me. Thanks 😀

@ralphtheninja
Copy link
Member

@DrYSG Please re-open if this is still an issue for you. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants