This is my first Jenkins pipeline project. I created a simple Node.js application, and I uploaded into hithub (public repo) and all I am trying to do with my Jenkinsfile is to "npm install" in my Build
stage. I believe Jenkins is finding the Jenkinsfile
but it is just not finding the npm
. I am using jenkins
official docker image to run my jenkins server. Here are the two plugging that I have installed
1) NodeJS Plugin and 2) Pipeline NPM Integration Plugin
and here is the file
pipeline {
agent any
stages {
stage ("Build") {
steps {
sh "npm install"
}
}
}
}
and this is the error I am getting when I run my 'Build Now' [second project] Running shell script + npm install
/var/jenkins_home/workspace/second project@tmp/durable-ef33ffd4/script.sh: 2: /var/jenkins_home/workspace/second project@tmp/durable-ef33ffd4/script.sh:
npm: not found
can someone help?