node.js = v9.3.0
Platform = OS X 10.13.3
Complier = Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Module = Canvas
binding.gyp =
{
"targets": [
{
"target_name": "binding",
"sources": [ "src/binding.cc" ]
}
]
}
Full error =
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/binding/src/binding.o', needed byRelease/binding.node'. Stop.
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:159:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Darwin 17.4.0
gyp ERR! command "/usr/local/Cellar/node/9.3.0_1/bin/node" "/usr/local/bin/node-gyp" "build"
gyp ERR! cwd /Users/tibowman/Documents/whatsappbtn
gyp ERR! node -v v9.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
You'll need to write a better bug report if you want help. What are you trying to do?
hi @bnoordhuis, well, I'm trying to install node-canvas, but that's irrelevant as node-gyp won't build, so I'm trying to get node-gyp to build. On most of my macs, it works just fine, but this one will not build at all, tried many fixes.
You don't build node-gyp, node-gyp is the build tool. What does npm install canvas print?
npm install --save canvas
> [email protected] install /Users/tibowman/Documents/whatsappbtn/node_modules/canvas
> node-gyp rebuild
Package gobject-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-2.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gobject-2.0', required by 'cairo', not found
gyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in binding.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/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at ChildProcess.emit (events.js:159:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Darwin 17.4.0
gyp ERR! command "/usr/local/Cellar/node/9.3.0_1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/tibowman/Documents/whatsappbtn/node_modules/canvas
gyp ERR! node -v v9.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
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 probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/tibowman/.npm/_logs/2018-02-13T23_08_15_212Z-debug.log
Check node-canvas's readme for dependencies you need to install.
I'm going to close this out because it's not a node-gyp issue. If you still have questions, open an issue over at node-canvas.
I going to go ahead a disagree with you there buddy (@bnoordhuis). putting the fact that im trying to install canvas, running node-gyp build fails all by itself. Any 'helpful' insight would be greatly appreciated.
I'm having this issue as well. There's definitely something up w/ node-gyp. @tbowdollar did you ever find a more 'helpful' answer?
Most helpful comment
I going to go ahead a disagree with you there buddy (@bnoordhuis). putting the fact that im trying to install canvas, running node-gyp build fails all by itself. Any 'helpful' insight would be greatly appreciated.