Ubuntu 12: binding.gyp not found when running node-gyp configure
13:59 vmplanet@ubuntu /usr/lib/node_modules/node-gyp $ sudo node-gyp configure
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | ia32
gyp info spawn python
gyp info spawn args [ '/usr/lib/node_modules/node-gyp/gyp/gyp',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/usr/lib/node_modules/node-gyp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/vmplanet/.node-gyp/0.10.2/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/vmplanet/.node-gyp/0.10.2',
gyp info spawn args '-Dmodule_root_dir=/usr/lib/node_modules/node-gyp',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: /usr/lib/node_modules/node-gyp) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/node-gyp/lib/configure.js:415:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:757:12)
gyp ERR! System Linux 3.2.0-39-generic-pae
gyp ERR! command "node" "/usr/bin/node-gyp" "configure"
gyp ERR! cwd /usr/lib/node_modules/node-gyp
gyp ERR! node -v v0.10.2
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
14:00 vmplanet@ubuntu /usr/lib/node_modules/node-gyp $ which python
/usr/bin/python
Ubuntu 12
What native module are you trying to install? It looks like your cwd is /usr/lib/node_modules/node-gyp so I'm not sure what you're trying to accomplish here...
Usually you just do npm install some-native-module and node-gyp is invoked internally. You don't normally need to invoke it directly.
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the v8-profiler 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 v8-profiler
so I tried node-gyp rebuild, got an error, looked around and found this: https://github.com/TooTallNate/node-gyp/issues/94#issuecomment-8658281 so I tried running node-gyp configure as well as rebuild from the node_modules folder and got the error you see.
Works for me:
☮ ~ (master) ∴ npm install [email protected]
npm http GET https://registry.npmjs.org/v8-profiler/3.6.2-1
npm http 304 https://registry.npmjs.org/v8-profiler/3.6.2-1
> [email protected] install /Users/nrajlich/node_modules/v8-profiler
> node-gyp rebuild
CXX(target) Release/obj.target/profiler/cpu_profiler.o
CXX(target) Release/obj.target/profiler/graph_edge.o
CXX(target) Release/obj.target/profiler/graph_node.o
CXX(target) Release/obj.target/profiler/heap_profiler.o
CXX(target) Release/obj.target/profiler/profile.o
CXX(target) Release/obj.target/profiler/profile_node.o
CXX(target) Release/obj.target/profiler/profiler.o
CXX(target) Release/obj.target/profiler/snapshot.o
SOLINK_MODULE(target) Release/profiler.node
SOLINK_MODULE(target) Release/profiler.node: Finished
[email protected] node_modules/v8-profiler
Are you on Ubuntu 12?
Nope. OS X.
Can you paste the full output of the same command I ran? (npm install [email protected])
14:11 vmplanet@ubuntu ~/dev/express $ npm install [email protected]
npm http GET https://registry.npmjs.org/v8-profiler/3.6.2-1
npm http 304 https://registry.npmjs.org/v8-profiler/3.6.2-1
> [email protected] install /home/vmplanet/dev/express/node_modules/v8-profiler
> node-gyp rebuild
make: Entering directory `/home/vmplanet/dev/express/node_modules/v8-profiler/build'
CXX(target) Release/obj.target/profiler/cpu_profiler.o
CXX(target) Release/obj.target/profiler/graph_edge.o
CXX(target) Release/obj.target/profiler/graph_node.o
../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetRetainersCount(v8::Local<v8::String>, const v8::AccessorInfo&)’:
../graph_node.cc:99:53: error: ‘class v8::HeapGraphNode’ has no member named ‘GetRetainersCount’
../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetRetainedSize(const v8::Arguments&)’:
../graph_node.cc:132:52: error: ‘class v8::HeapGraphNode’ has no member named ‘GetRetainedSize’
../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetRetainer(const v8::Arguments&)’:
../graph_node.cc:154:65: error: ‘class v8::HeapGraphNode’ has no member named ‘GetRetainer’
../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetDominator(v8::Local<v8::String>, const v8::AccessorInfo&)’:
../graph_node.cc:162:65: error: ‘class v8::HeapGraphNode’ has no member named ‘GetDominatorNode’
make: *** [Release/obj.target/profiler/graph_node.o] Error 1
make: Leaving directory `/home/vmplanet/dev/express/node_modules/v8-profiler/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:757:12)
gyp ERR! System Linux 3.2.0-39-generic-pae
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vmplanet/dev/express/node_modules/v8-profiler
gyp ERR! node -v v0.10.2
gyp ERR! node-gyp -v v0.9.3
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the v8-profiler 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 v8-profiler
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.2.0-39-generic-pae
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "--no-bin-links" "install" "[email protected]"
npm ERR! cwd /home/vmplanet/dev/express
npm ERR! node -v v0.10.2
npm ERR! npm -v 1.2.15
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/vmplanet/dev/express/npm-debug.log
npm ERR! not ok code 0
14:18 vmplanet@ubuntu ~/dev/express $
It doesn't look like v8-profiler works with node v0.10.x yet (https://github.com/dannycoates/v8-profiler/issues/22). This is not a node-gyp issue...
Bah. Thanks for the help. Especially since this wasn't related to your library.
Hi TooTallNate, I've run across the same issue as jcollum on OSX 10.9, here is the stack trace:
$ node-gyp configure
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/rdiri',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/dir',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/dir',
gyp info spawn args '-Dmodule_root_dir=/Users/dir',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: /Users/dir) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/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 Darwin 13.0.0
gyp ERR! command "node" "/usr/local/bin/node-gyp" "configure"
gyp ERR! cwd /Users/rfatahi/dir
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
$ npm install [email protected]
npm http GET http://registry.npmjs.org/v8-profiler/3.6.2-1
npm http 200 http://registry.npmjs.org/v8-profiler/3.6.2-1
npm http GET http://registry.npmjs.org/v8-profiler/-/v8-profiler-3.6.2-1.tgz
npm http 200 http://registry.npmjs.org/v8-profiler/-/v8-profiler-3.6.2-1.tgz
> [email protected] install /Users/dir/node_modules/v8-profiler
> node-gyp rebuild
gyp: /Users/dir/.node-gyp/0.10.26/common.gypi not found (cwd: /Users/dir/node_modules/v8-profiler) while reading includes of binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/Cellar/node/0.10.26/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337: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 Darwin 13.0.0
gyp ERR! command "node" "/usr/local/Cellar/node/0.10.26/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/dir/node_modules/v8-profiler
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
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 v8-profiler 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 v8-profiler
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.26/bin/node" "/usr/local/bin/npm" "install" "[email protected]"
npm ERR! cwd /Users/dir
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/rfatahi/sailsProj/ddd/npm-debug.log
npm ERR! not ok code 0
I just made a boob mistake, there's an earlier stack error that is an empty dir i think, sorry nevermind
boob mistake
MUST... RESIST... CRASS... JOKE...
ok, so i'm the boob, i got back to where i was.. at least it was repeated. there's report on SO (http://stackoverflow.com/questions/20911930/when-trying-to-configure-or-rebuild-node-gyp-getting-errors-mac-osx-mavericks): here's the trace
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/rfatahi/Desktop/hichartsServer/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/rfatahi/.node-gyp/0.10.26/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/rfatahi/.node-gyp/0.10.26',
gyp info spawn args '-Dmodule_root_dir=/Users/rfatahi/Desktop/hichartsServer',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: /Users/rfatahi/Desktop/hichartsServer) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/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 Darwin 13.0.0
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/rfatahi/Desktop/hichartsServer
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
when run node-gyp configure build i get the following trace:
$ node-gyp configure build
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/rfatahi/Desktop/hichartsServer/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/rfatahi/.node-gyp/0.10.26/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/rfatahi/.node-gyp/0.10.26',
gyp info spawn args '-Dmodule_root_dir=/Users/rfatahi/Desktop/hichartsServer',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: /Users/rfatahi/Desktop/hichartsServer) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/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 Darwin 13.0.0
gyp ERR! command "node" "/usr/local/bin/node-gyp" "configure" "build"
gyp ERR! cwd /Users/dir
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
> rfatahi
maybe compiler issue, i think gyp requires gcc
I have this problem, what is solution?
solution for me was here: https://github.com/TooTallNate/node-gyp/issues/162, deleting .node-gyp
I know this is a rather old thread, but I just wanted to point out that this is still an ongoing issue while installing bcrypt and the comments here were my salvation. That, and making sure g++ was installed on the system.
So, if anyone out there comes across a node-gyp rebuild problem try:
- Deleting
~/.node-gpyfolder. sudo apt-get install g++ gyp
And then, npm install bcrypt.
@nfantone that did the trick :+1:
@nfantone :+1:
hello guys ! i still have this problem can you help me out!
I'm also having the same problem as described above. I've ensured g++ is installed and i tried deleting the .node-gyp folder found in /Users/Username in windows.