错误在Mac上安装Ionic Framework

时间:2015-07-01 23:26:46

标签: node.js npm ionic-framework

当尝试使用命令npm ERR! Darwin 14.3.0 npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "cordova" "ionic" npm ERR! node v0.12.5 npm ERR! npm v2.12.0 npm ERR! Attempt to unlock /usr/local/lib/node_modules/cordova, which hasn't been locked npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! <https://github.com/npm/npm/issues> npm ERR! Darwin 14.3.0 npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "cordova" "ionic" npm ERR! node v0.12.5 npm ERR! npm v2.12.0 npm ERR! Attempt to unlock /usr/local/lib/node_modules/ionic, which hasn't been locked npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! <https://github.com/npm/npm/issues> npm ERR! Please include the following file with any support request: npm ERR! /Users/kernelliott/npm-debug.log 通过node.js在我的mac上安装离子框架时,我收到以下错误

{{1}}

我知道为什么会收到这些错误吗?

1 个答案:

答案 0 :(得分:3)

在系统目录中安装时使用sudo(使用-g,全局标志):

sudo npm install -g cordova ionic