Closed japboy closed 11 years ago
npm install grunt-reduce doesn't seem to detect node-canvas properly in spite of npm install assetgraph-builder does properly.
npm install grunt-reduce
node-canvas
npm install assetgraph-builder
$ npm install grunt-reduce npm WARN package.json weider@0.0.1 No README.md file found! npm http GET https://registry.npmjs.org/grunt-reduce npm http 304 https://registry.npmjs.org/grunt-reduce npm http GET https://registry.npmjs.org/assetgraph-builder/1.6.3 npm http 304 https://registry.npmjs.org/assetgraph-builder/1.6.3 npm http GET https://registry.npmjs.org/assetgraph/1.4.2 [...] npm http GET https://registry.npmjs.org/contextify npm http 304 https://registry.npmjs.org/xtend/1.0.3 > canvas@0.13.1 install /Users/User/proj/grunt/node_modules/grunt-reduce/node_modules/assetgraph-builder/node_modules/histogram/node_modules/canvas > node-gyp rebuild npm http GET https://registry.npmjs.org/debug/0.7.0 npm http 304 https://registry.npmjs.org/nwmatcher npm WARN package.json nwmatcher@1.3.1 No README.md file found! npm http 304 https://registry.npmjs.org/inherits npm http 304 https://registry.npmjs.org/graceful-fs npm http 304 https://registry.npmjs.org/minimatch > canvas@0.12.1 preinstall /Users/User/proj/grunt/node_modules/grunt-reduce/node_modules/assetgraph-builder/node_modules/assetgraph-sprite/node_modules/canvas > node-waf configure build sh: node-waf: command not found npm WARN optional dep failed, continuing canvas@0.12.1 npm http 304 https://registry.npmjs.org/cssom npm http 304 https://registry.npmjs.org/cssstyle npm http 304 https://registry.npmjs.org/contextify npm http 304 https://registry.npmjs.org/debug/0.7.0 npm http GET https://registry.npmjs.org/lru-cache npm http GET https://registry.npmjs.org/sigmund npm http 304 https://registry.npmjs.org/htmlparser-papandreou/1.7.6-patch1 CXX(target) Release/obj.target/canvas/src/Canvas.o npm http GET https://registry.npmjs.org/bindings In file included from ../src/Canvas.cc:8: ../src/Canvas.h:19:10: fatal error: 'cairo/cairo.h' file not found #include <cairo/cairo.h> ^ 1 error generated. make: *** [Release/obj.target/canvas/src/Canvas.o] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/User/.homebrew/Cellar/node/0.10.2/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 Darwin 11.4.2 gyp ERR! command "node" "/Users/User/.homebrew/Cellar/node/0.10.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/User/proj/grunt/node_modules/grunt-reduce/node_modules/assetgraph-builder/node_modules/histogram/node_modules/canvas gyp ERR! node -v v0.10.2 gyp ERR! node-gyp -v v0.9.3 gyp ERR! not ok npm WARN optional dep failed, continuing histogram@0.1.3 npm http 304 https://registry.npmjs.org/sigmund npm http 304 https://registry.npmjs.org/lru-cache npm http 304 https://registry.npmjs.org/bindings > contextify@0.1.5 install /Users/User/proj/grunt/node_modules/grunt-reduce/node_modules/assetgraph-builder/node_modules/assetgraph/node_modules/jsdom-papandreou/node_modules/contextify > node-gyp rebuild CXX(target) Release/obj.target/contextify/src/contextify.o SOLINK_MODULE(target) Release/contextify.node SOLINK_MODULE(target) Release/contextify.node: Finished grunt-reduce@0.1.6 node_modules/grunt-reduce └── assetgraph-builder@1.6.3 (passerror@0.0.1, bufferjs@1.0.2, pngquant@0.0.3, temp@0.4.0, underscore@1.2.0, uglify-js-papandreou@1.3.3-patch1, less@1.3.0, memoizer@0.0.4, pngcrush@0.0.3, optimist@0.2.6, seq@0.3.5, jpegtran@0.0.4, optipng@0.0.4, uglifyast@0.1.0, assetgraph-sprite@0.5.1, express-processimage@0.0.6, assetgraph@1.4.2)
This happens after I upgrade my Node.js with brew upgrade. Any idea?
brew upgrade
assetgraph-builder 1.7.0 was the first node.js 0.10-compatible release. Updating to 1.7.10 and releasing a new grunt-reduce will fix it.
Available in grunt-reduce 0.1.7
Thanks. It works!
npm install grunt-reduce
doesn't seem to detectnode-canvas
properly in spite ofnpm install assetgraph-builder
does properly.This happens after I upgrade my Node.js with
brew upgrade
. Any idea?