Jenkins-env:"node":没有这样的文件或目录
我有一个使用以下配置的jenkins服务器 https://github.com/shierro/jenkins- docker-examples/tree/master/05-aws-ecs
I have a jenkins server that is configured using https://github.com/shierro/jenkins-docker-examples/tree/master/05-aws-ecs
我正在使用简单的Jenkinsfile和 jenkins NodeJS插件
I am running a blue ocean pipeline using a simple Jenkinsfile and the jenkins NodeJS plugin
pipeline {
agent any
tools {
nodejs 'node10'
}
stages {
stage ('Checkout Code') {
steps {
checkout scm
}
}
stage ('Install dependencies') {
steps {
sh "echo $PATH"
sh "npm install"
}
}
}
}
我确保还要添加 node10 全局工具,并且上面已使用w/c
I made sure to add the node10 global tool as well w/c is used above
当管道到达脚本sh "npm install"
时,我正在运行此错误
When the pipeline gets to the script sh "npm install"
i am running through this error
这是命令echo $PATH
的输出
所以我认为这不是路径问题
so i think it's not a path issue
此外,它也无法添加全局包
Also, it also wasn't able to add the global package
更多信息可能会有所帮助:
More info that might help:
- Docker Jenkins服务器:
FROM jenkins/jenkins:2.131-alpine
- 蓝海版本:1.7.0
- NodeJS插件:1.2.6
- 多个服务器已经重新启动
- Docker Jenkins server:
FROM jenkins/jenkins:2.131-alpine
- Blue ocean version: 1.7.0
- NodeJS Plugin: 1.2.6
- Multiple server restarts already
任何想法,为什么jenkins服务器不知道节点在哪里?
预先感谢!
感谢@JoergS的帮助!在这种情况下,罪魁祸首是:使用高山图像作为码头工人基地.因此,从jenkins/jenkins:2.131-alpine
切换到jenkins/jenkins:2.131
解决了NodeJS插件问题.
Thanks to @JoergS for some insight! The culprit in this case is: using alpine image as the docker base. So switching from jenkins/jenkins:2.131-alpine
to jenkins/jenkins:2.131
solved the NodeJS plugin issue.