所以我一直在尝试在一周内安装各种NPM软件包,但我的终端不断给我一个错误信息,如下所示:
R! Darwin 16.1.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "browserify"
npm ERR! node v6.6.0
npm ERR! npm v3.10.8
npm ERR! path /usr/local/lib/node_modules/.staging/JSONStream-fcd46b7f
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall rmdir
npm ERR! Error: EACCES: permission denied, rmdir '/usr/local/lib/node_modules/.staging/JSONStream-fcd46b7f'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, rmdir '/usr/local/lib/node_modules/.staging/JSONStream-fcd46b7f'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rmdir',
npm ERR! path: '/usr/local/lib/node_modules/.staging/JSONStream- fcd46b7f' }
npm ERR!
**strong text**npm ERR! Please try running this command again as root/Administrator.
npm ERR!请在支持请求中包含以下文件:
我一直在尝试阅读错误消息并搜索Google和Stack溢出但似乎可以找到答案。 有谁知道发生了什么以及如何解决它?我理解它说“请尝试以root / Adminstrator再次运行此命令”,我认为我已经在做了。