Search code examples
jenkinsjenkins-plugins

Configure NodeJs on Jenkins?


I installed the NodeJS plugin 1.3.7 on an installation of Jenkins 2.235.2. After restarting Jenkins I see the NodeJS options on job configuration screens, but there is nothing on the Jenkins configuration screen that makes any mention of Node, so I am not able to add any installations for the jobs to use. I've found several sources that say that clicking Check now on the Advanced tab of the Plugin Manager screen will solve this, but that has had no effect. Can anyone suggest what else I might try to be able to add Node installations, or explain what I'm missing?


Solution

  • Go to Manage Jenkins >> Global tool configuration

    and configure node there according to you

    enter image description here

    and in your jenkinsfile use

    tools {
      nodejs "nodejs-2.x"
    }