Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法安装Node.js包_Node.js_Npm - Fatal编程技术网

无法安装Node.js包

无法安装Node.js包,node.js,npm,Node.js,Npm,我正在尝试安装。在尝试安装此插件时,我的package.json文件设置如下: { "name": "Test", "preferGlobal": true, "version": "1.0.0", "dependencies" : { "colors" : "*", "lodash" : "2.4.1", "imagemagick-native":"0.2.9" }, "analyze": false, "engines": {

我正在尝试安装。在尝试安装此插件时,我的package.json文件设置如下:

{
  "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"
  }
}
当我执行npm安装时,我得到一个错误。错误显示:

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
我正试图在Mac OS X上运行此程序。我已使用命令
brew install imagemagick
通过终端安装了imagemagick。当我执行echo$PATH时,我没有在那里看到imagemagick。我看到以下情况:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:
/usr/local/opt/imagemagick
当我执行
sudo find/-name“imagemagick”
时,我看到以下内容:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:
/usr/local/opt/imagemagick
我不确定这是否是问题所在。如果是,我不知道如何在Mac OS X中将其添加到我的路径中。我衷心感谢能够帮助我克服这一困难的任何人。

您是否尝试过此解决方案: