$ node-gyp 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 make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: *** No rule to make target `Release/obj.target/hello/hello.o', needed by `Release/hello.node'. Stop.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/share/npm/lib/node_modules/node-gyp/lib/build.js:232:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Darwin 12.2.0
gyp ERR! command "node" "/usr/local/share/npm/bin/node-gyp" "build"
gyp ERR! cwd /Users/yarco/Sites/js/tmp
gyp ERR! node -v v0.8.14
gyp ERR! node-gyp -v v0.8.0
gyp ERR! not ok
following the code from http://nodejs.org/api/addons.html
How did you install node-gyp?
npm install -g node-gyp
BTW, i'm updating my XCode. will it affect this?
node-gyp configure is ok
just node-gyp build.
$ tree build/
build/
├── Makefile
├── binding.Makefile
├── config.gypi
├── gyp-mac-tool
└── hello.target.mk
0 directories, 5 files
seems didn't create the directory Release
I can't seem to reproduce. Can you give me any more details?
oh, sorry...i make something wrong. it is ok now.
yarcowang, I am facing a similar problem what did you do to solve the issue? Could you post further details?
Yes, i'm shamed to say that...
Thanks mate!! I just spotted the same problem my source file was named "test.cpp" and in the binding.gyp targets -> sources I had wrongly mentioned "test.cc"
Me too, same problem, thank you!
Mine lacks the file path.
Hi, i'm a newer, could you please tell me how to define the "target" and "source"?
omg yeah i had a typo in targets->sources as well, wrong filename, haha shit! Thanks for this post, would have taken me hours otherwise. It's in binding.gyp, William
+1! Sensible error messages are always helpful :D.
Seems like this is an issue that is relatively common. I'm having it now and I've found several other issues regarding something similar. I wonder if anyone could point me to a resource for understanding what is going on, so that I can troubleshoot? I look at the GYP documentation and it's got a lot of info, but I'm not seeing the answer to my question there , or at least not in a way that I can understand. Assuming my targets->sources entry is incorrect, how can I figure out what it should be?
Most helpful comment
Yes, i'm shamed to say that...
the filename in binding.gyp (field: targets -> sources) is not right!!!