1

I am trying to install the Node-ImageMagick plugin. In an attempt to install this plugin, I have my package.json file setup like this:

{
  "name": "Test",
  "preferGlobal": true,
  "version": "1.0.0",
  "dependencies" : {
    "colors" : "*",
    "lodash" : "2.4.1",
    "imagemagick-native":"0.2.9"    
  },
  "analyze": false,
  "engines": {
    "node": ">=0.6"
  }
}

When I execute npm install, I get an error. The error says:

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: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.1.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/me/source/test/node_modules/imagemagick-native
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm ERR! imagemagick-native@0.2.9 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the imagemagick-native@0.2.9 install script.
npm ERR! This is most likely a problem with the imagemagick-native 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 imagemagick-native
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/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: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.1.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/me/source/test//node_modules/imagemagick-native
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm ERR! imagemagick-native@0.2.9 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the imagemagick-native@0.2.9 install script.
npm ERR! This is most likely a problem with the imagemagick-native 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 imagemagick-native
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/me/source/test
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/me/source/test/npm-debug.log
npm ERR! not ok code 0

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/me/source/test/npm-debug.log
npm ERR! not ok code 0

I'm trying to run this on Mac OS X. I've installed imagemagick via the terminal using the command brew install imagemagick. When I execute echo $PATH, I do not see imagemagick there. I see the following:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:

When I execute sudo find / -name "imagemagick", I see the following:

/usr/local/opt/imagemagick

I'm not sure if this is the problem. If it is, I do not know how to add it to my PATH in Mac OS X. I sincerely appreciate anyone who can help me get over this hump.

user70192
  • 13,786
  • 51
  • 160
  • 240
  • Have you tried this solution: http://stackoverflow.com/questions/21155922/error-installing-node-gyp-on-ubuntu – Union find Jun 28 '14 at 20:53

0 Answers0