无法在Mac上安装AngularJS依赖项

时间:2014-09-11 08:53:03

标签: node.js angularjs macos git npm

我想在我的Macbook(64位,Intel Core i7,OSX 10.9.4)上查看AngularJS教程。

我已经安装了Git和Node,并且我已经克隆了存储库,但我无法使用npm安装项目依赖项,因为显然无法找到karma-chrome-launcher:

angular-phonecat user$ npm install
npm ERR! Error: Not found: karma-chrome-launcher@'^0.1.4'
npm ERR! Valid install targets:
npm ERR! ["latest","0.0.1","0.0.2","0.1.0","0.1.1","0.1.2","0.1.3","0.1.4"]
npm ERR!     at installTargetsError (/usr/lib/node_modules/npm/lib/cache.js:313:10)
npm ERR!     at /usr/lib/node_modules/npm/lib/cache.js:274:15
npm ERR!     at saved (/usr/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:67:7)
npm ERR!     at cb (/usr/lib/node_modules/npm/lib/utils/graceful-fs.js:31:9)
npm ERR! Report this *entire* log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /Users/transfer/Documents/GitHub/angular-phonecat
npm ERR! node -v v0.4.11
npm ERR! npm -v 1.0.17
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/user/Documents/GitHub/angular-phonecat/npm-debug.log
npm not ok

我尝试直接安装软件包,但现在我得到了一个不同的错误,告诉我CPU类型错误。如果我尝试运行“npm install bower”,我会收到相同的错误消息。这可能是一个32位/ 64位的问题吗?我做了一些谷歌搜索,但我没有找到任何有用的东西。

angular-phonecat transfer$ npm install karma-chrome-launcher
npm ERR! tar "-mvxpf" "-" "-o" "-C" "/var/folders/qs/2kjpsc150f30c0p9v_0y7m100000gp/T/npm-1410421930167/1410421930167-0.4476239620707929/contents/___package.npm" execvp(): Bad CPU type in executable
npm ERR! tar "-mvxpf" "-" "-o" "-C" "/var/folders/qs/2kjpsc150f30c0p9v_0y7m100000gp/T/npm-1410421930167/1410421930167-0.4476239620707929/contents/___package.npm" 
npm ERR! Failed unpacking /var/folders/qs/2kjpsc150f30c0p9v_0y7m100000gp/T/npm-1410421930167/1410421930167-0.4476239620707929/tmp.tgz
npm ERR! couldn't unpack /var/folders/qs/2kjpsc150f30c0p9v_0y7m100000gp/T/npm-1410421930167/1410421930167-0.4476239620707929/tmp.tgz to /var/folders/qs/2kjpsc150f30c0p9v_0y7m100000gp/T/npm-1410421930167/1410421930167-0.4476239620707929/contents
npm ERR! Error: Failed tar "-mvxpf" "-" "-o" "-C" "/var/folders/qs/2kjpsc150f30c0p9v_0y7m100000gp/T/npm-1410421930167/1410421930167-0.4476239620707929/contents/___package.npm"
npm ERR! exited with 127
npm ERR!     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/exec.js:85:8)
npm ERR!     at ChildProcess.emit (events.js:67:17)
npm ERR!     at Socket.<anonymous> (child_process.js:172:12)
npm ERR!     at Socket.emit (events.js:64:17)
npm ERR!     at Array.0 (net.js:837:12)
npm ERR!     at EventEmitter._tickCallback (node.js:126:26)
npm ERR! Report this *entire* log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/bin/npm" "install" "karma-chrome-launcher"
npm ERR! cwd /Users/transfer/Documents/GitHub/angular-phonecat
npm ERR! node -v v0.4.11
npm ERR! npm -v 1.0.17
npm ERR! gzip "--decompress" "--stdout" "/var/folders/qs/2kjpsc150f30c0p9v_0y7m100000gp/T/npm-1410421930167/1410421930167-0.4476239620707929/tmp.tgz" execvp(): Bad CPU type in executable
npm ERR! gzip "--decompress" "--stdout" "/var/folders/qs/2kjpsc150f30c0p9v_0y7m100000gp/T/npm-1410421930167/1410421930167-0.4476239620707929/tmp.tgz" 
npm ERR! Failed unpacking /var/folders/qs/2kjpsc150f30c0p9v_0y7m100000gp/T/npm-1410421930167/1410421930167-0.4476239620707929/tmp.tgz
npm ERR! couldn't unpack /var/folders/qs/2kjpsc150f30c0p9v_0y7m100000gp/T/npm-1410421930167/1410421930167-0.4476239620707929/tmp.tgz to /var/folders/qs/2kjpsc150f30c0p9v_0y7m100000gp/T/npm-1410421930167/1410421930167-0.4476239620707929/contents
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/transfer/Documents/GitHub/angular-phonecat/npm-debug.log
npm not ok

0 个答案:

没有答案