npm global gulp install

时间:2015-08-27 17:53:54

标签: npm gulp

请帮帮我。 我刚开始学习gulp和终端,我无法在我的Mac上安装grobal gulp。 我正在尝试所有不同的修复方法,但它会导致更多问题。

npm ERR! Darwin 14.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "i" "-g" "gulp"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! path /usr/local/lib/node_modules/gulp
npm ERR! code EACCES
npm ERR! errno -13

npm ERR! Error: EACCES, rmdir '/usr/local/lib/node_modules/gulp'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES, rmdir '/usr/local/lib/node_modules/gulp']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/usr/local/lib/node_modules/gulp' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES, rmdir '/usr/local/lib/node_modules/gulp'
npm ERR! error rolling back     at Error (native)
npm ERR! error rolling back  { [Error: EACCES, rmdir '/usr/local/lib/node_modules/gulp']
npm ERR! error rolling back   errno: -13,
npm ERR! error rolling back   code: 'EACCES',
npm ERR! error rolling back   path: '/usr/local/lib/node_modules/gulp' }

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/Christina/Desktop/portfolio/npm-debug.log

1 个答案:

答案 0 :(得分:1)

您也可以在项目中本地获取它并使用以下命令运行它:

./node_modules/gulp/bin/gulp.js task