.bin/webpack-dev-server permission denied
原创
©著作权归作者所有:来自51CTO博客作者chenyanlong的原创作品,请联系作者获取转载授权,否则将追究法律责任
问题:
chenyanlong:/data/web/20200514/DiLi_XBC$ npm run dev
> vue2.0@1.0.0 dev /data/web/20200514/DiLi_XBC
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
sh: 1: webpack-dev-server: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! vue2.0@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 vue2.0@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! /home/chenyanlong/.npm/_logs/2020-05-14T08_54_48_964Z-debug.log
解决方案:
电脑出现 .bin/webpack-dev-server permission denied,提示权限问题
sudo npm install webpack -g
sudo npm install webpack-dev-server -g