0

我想在 iOS 中安装 Plugman 来管理 Phonegap 插件。我在终端中使用以下命令。

npm install -g 插件

但我收到以下错误,

npm ERR! Error: EACCES, open '/Users/gtmac/.npm/npm/1.3.4/package/package.json'
npm ERR!  { [Error: EACCES, open '/Users/gtmac/.npm/npm/1.3.4/package/package.json']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/Users/gtmac/.npm/npm/1.3.4/package/package.json',
npm ERR!   parent: 'plugman' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 14.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "plugman"
npm ERR! cwd /Users/gtmac/Documents/Sinu/Insightix
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /Users/gtmac/.npm/npm/1.3.4/package/package.json
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open '/Users/gtmac/.npm/npm/1.3.4/package/package.json'
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/gtmac/Documents/Sinu/Insightix/npm-debug.log
npm ERR! not ok code 0
4

1 回答 1

2

我在执行 'sudo -s' 后通过运行命令解决了这个问题

  1. $须藤-s
  2. $ npm install -g 插件
于 2015-05-06T08:49:30.780 回答