admin管理员组文章数量:1356847
Description: I am running Jenkins inside a Docker container on Windows 11. I have the Ubuntu app installed from the Microsoft Store, which already has npm version 8.5.1 installed.
However, when I run my Jenkins pipeline, I get the following error during the npm install step:
+ npm install
/var/jenkins_home/workspace/test-jenkins-nestjs@tmp/durable-8ba17fc4/script.sh.copy: 1: npm: not found
script returned exit code 127
pipeline {
agent any
stages {
stage("checkout") {
steps {
checkout scm
}
}
stage("Tests") {
steps {
sh "sudo apt install npm" // Installing npm
sh "npm test"
}
}
stage("Build") {
steps {
sh 'npm run build'
}
}
}
}
本文标签: Jenkins in Docker Cannot Find NPM npm not found (Exit Code 127)Stack Overflow
版权声明:本文标题:Jenkins in Docker Cannot Find NPM: npm: not found (Exit Code 127) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744046353a2581596.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论