npm mac上安装命令报错

es6 sudo npm install webpack --save-dev
Password:
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "webpack" "--save-dev"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code MODULE_NOT_FOUND

npm ERR! Cannot find module 'github-url-from-git'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/is...

npm ERR! Please include the following file with any support request:
npm ERR! /Users/derek/Documents/myProject/es6/npm-debug.log

不知道(Cannot find module 'github-url-from-git')要怎么解决,请高手帮忙看看


红糖糍粑
浏览 942回答 1
1回答

噜噜哒

sudo 命令是一般是全局安装用的,--save和--save-dev一般当前项目下安装用的。先试试不要sudo安装npm install webpack --save-dev还报错就升级一下npm再试试sudo npm -g install npm@latest
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript