当前位置: 首页 > 工具软件 > script-server > 使用案例 >

vue node_modules/.bin/webpack-dev-server: Permission denied error

鱼旺
2023-12-01

运行vue项目报错,webpack-dev-server: Permission denied 无权限,

npm run dev

>@1.0.0 dev /Users/log/Desktop/vue/
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

sh: /Users/log/Desktop/vue//node_modules/.bin/webpack-dev-server: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR!@1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the @1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/log/.npm/_logs/2020-12-24T06_12_16_330Z-debug.log

执行 下面2个命令,就OK了

sudo npm install webpack -g

 sudo npm install webpack-dev-server -g 
 
 类似资料: