centos npm run build 報錯


報錯信息

npm run  build 
> XXXX@0.1.0 build /home/lvph/work/XXXX
> vue-cli-service build

sh: XXXX/node_modules/.bin/vue-cli-service: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! XXX@0.1.0 build: `vue-cli-service build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the xxxx@0.1.0 build 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/lvph/.npm/_logs/2020-01-19T01_33_20_803Z-debug.log

解決辦法

到項目路徑下
rm -rf node_modules
rm package-lock.json
npm cache clear --force
在執行
npm install

最后成功

npm run build


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM