请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

老师,window10系统在git bash输入npm install webpack -g没反应,加上sudo就出错了怎么办?

正在回答 回答被采纳积分+3

2回答

幕布斯2405234 2017-10-25 00:24:22

sudo是linux系统才用的

0 回复 有任何疑惑可以回复我~
提问者 慕后端8619989 2017-10-24 21:48:01

补充:安装了python也没用


0 回复 有任何疑惑可以回复我~
  • Rosen #1
    贴下什么错误
    回复 有任何疑惑可以回复我~ 2017-10-25 11:34:02
  • 提问者 慕后端8619989 回复 Rosen #2
    C:\>cd users/文奇/mmall/doc/mmall-fe
    
    C:\Users\文奇\mmall\doc\mmall-fe>npm install webpack -g
    npm WARN optional dep failed, continuing fsevents@1.1.2
    \
    > uglifyjs-webpack-plugin@0.4.6 postinstall C:\Users\文奇\AppData\Roaming\npm\node_modules\webpack\node_modules\uglifyjs-webpack-plugin
    > node lib/post_install.js
    
    C:\Users\文奇\AppData\Roaming\npm\webpack -> C:\Users\文奇\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js
    npm ERR! Windows_NT 10.0.10586
    npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "webpack" "-g"
    npm ERR! node v4.4.7
    npm ERR! npm  v2.15.8
    npm ERR! code EPEERINVALID
    
    npm ERR! peerinvalid The package webpack@3.8.1 does not satisfy its siblings' peerDependencies requirements!
    npm ERR! peerinvalid Peer webpack-dev-server@1.16.5 wants webpack@>=1.3.0 <3
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     C:\Users\文奇\mmall\doc\mmall-fe\npm-debug.log
    回复 有任何疑惑可以回复我~ 2017-10-29 14:50:04
  • 提问者 慕后端8619989 回复 Rosen #3
    贴错了,是这个:
    文奇@DESKTOP-3UDCUNA MINGW64 ~/mmall/doc/mmall-fe (mmall_v1.0)
    $ npm install webpack -g
    npm WARN optional dep failed, continuing fsevents@1.1.2
    
    > uglifyjs-webpack-plugin@0.4.6 postinstall C:\Users\文奇\AppData\Roaming\npm\node_modules\webpack\node_modules\uglifyjs-webpack-plugin
    > node lib/post_install.js
    
    C:\Users\文奇\AppData\Roaming\npm\webpack -> C:\Users\文奇\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js
    npm ERR! Windows_NT 10.0.10586
    npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "webpack" "-g"
    npm ERR! node v4.4.7
    npm ERR! npm  v2.15.8
    npm ERR! code EPEERINVALID
    
    npm ERR! peerinvalid The package webpack@3.8.1 does not satisfy its siblings' peerDependencies requirements!
    npm ERR! peerinvalid Peer webpack-dev-server@1.16.5 wants webpack@>=1.3.0 <3
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     C:\Users\文奇\mmall\doc\mmall-fe\npm-debug.log
    回复 有任何疑惑可以回复我~ 2017-10-29 14:51:37
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信