当前位置:网站首页>Jenkins build prompt error: eacces: permission denied

Jenkins build prompt error: eacces: permission denied

2022-06-26 13:36:00 woowen!

jenkins When building front-end projects , Here is the error message :

ERROR  Error: EACCES: permission denied, unlink '/var/jenkins_home/workspace/uat-risk-static/dist/023965f43a24e8ea5c2f.worker.js'
Error: EACCES: permission denied, unlink '/var/jenkins_home/workspace/uat-risk-static/dist/023965f43a24e8ea5c2f.worker.js'
npm ERR! code ELIFECYCLE
npm ERR! errno 1

The general information is : Permission denied

Two ways of thinking :

1. jenkins The configured server directory has permissions , The operation and maintenance authority needs to be released .

Jenkins The roles used by the runtime are jenkins

chown -R jenkins This directory , Just make changes !

2. Modify the configuration : Open the configuration information of the current task item , Find the build command line to add

npm install --unsafe-perm=true --allow-root

 

原网站

版权声明
本文为[woowen!]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202170514022545.html