npm - Gulp issues with cario install command not found when trying to installing canvas -
i'm new working in command line. have project i'm setting gulp, , have gulp installed , compiling sass files successfully. however, cannot install canvas via:
$ npm install canvas
i need install canvas because of dependencies css-sprite has run. getting following error. have installed cairo, quartz, , homebrew installed. i've researched other tickets , tried run export pkg_config_path=/opt/x11/lib/pkgconfig
, install again. i've had no luck, , have no idea else in attempts troubleshoot.
here error...
npm http https://registry.npmjs.org/canvas npm http 304 https://registry.npmjs.org/canvas npm http https://registry.npmjs.org/nan npm http 304 https://registry.npmjs.org/nan canvas@1.1.3 install /usr/local/lib/node_modules/canvas node-gyp rebuild ./util/has_cairo_freetype.sh: line 4: pkg-config: command not found gyp: call './util/has_cairo_freetype.sh' returned exit status 0. gyp err! configure error gyp err! stack error: `gyp` failed exit code: 1 gyp err! stack @ childprocess.oncpexit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16) gyp err! stack @ childprocess.eventemitter.emit (events.js:98:17) gyp err! stack @ process.childprocess._handle.onexit (child_process.js:797:12) gyp err! system darwin 13.1.0 gyp err! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp err! cwd /usr/local/lib/node_modules/canvas gyp err! node -v v0.10.26 gyp err! node-gyp -v v0.12.2 gyp err! not ok npm err! canvas@1.1.3 install: `node-gyp rebuild` npm err! exit status 1 npm err! npm err! failed @ canvas@1.1.3 install script. npm err! problem canvas package, npm err! not npm itself. npm err! tell author fails on system: npm err! node-gyp rebuild npm err! can info via: npm err! npm owner ls canvas npm err! there additional logging output above. npm err! system darwin 13.1.0 npm err! command "node" "/usr/local/bin/npm" "install" "-g" "canvas" npm err! cwd /users/kylebebeau/websites/ls/code/templates/ls3 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 found in: npm err! /users/kylebebeau/websites/ls/code/templates/ls3/npm-debug.log npm err! not ok code 0
any or guidance appreciated.
i had issue well. had used brew install cairo , quartz. followed these instructions here , step fixed issue.
export pkg_config_path=/opt/x11/lib/pkgconfig
make sure add .bashrc
or .zshrc
if want persist across sessions. deleted node_modules
directory after compiling , tried npm install
again in new terminal session , had re-export pkg_config_path allow compile again.
here output abbreviated demonstrate.
$ npm install > node-gyp rebuild package xcb-shm not found in pkg-config search path. perhaps should add directory containing `xcb-shm.pc' pkg_config_path environment variable package 'xcb-shm', required 'cairo', not found gyp: call './util/has_cairo_freetype.sh' returned exit status 0. while trying load binding.gyp gyp err! configure error ... $ export pkg_config_path=/opt/x11/lib/pkgconfig $ npm install $ canvas@1.1.3 install $home/projects/canvas/node_modules/canvas $ node-gyp rebuild ... successful compile
npm start
worked without errors @ point
i hope helps else runs this.
Comments
Post a Comment