user3886641
user3886641

Reputation: 31

ERROR: No jenkins.plugins.nodejs.tools.NodeJSInstallation named node found

I'm trying to setup jenkins on a windows machine. The job is configured using multi-branch pipeline. The job script is failing when trying to run npm install with below error.

ERROR: No jenkins.plugins.nodejs.tools.NodeJSInstallation named node found

I've already installed nodejs plugin for jenkins and configured jenkins to point to correct nodejs executable folder in Jenkins -> Manage Jenkins -> Global Tool Configuration -> NodeJS. When running npm install from command prompt, it works fine. Has anyone faced this issue before? Any clues/direction will be appreciated.

Upvotes: 1

Views: 7532

Answers (2)

Dima Dorogonov
Dima Dorogonov

Reputation: 2563

Here is my working solution enter image description here

tools {
    nodejs "NodeJs"
}

Upvotes: 0

T. Putters
T. Putters

Reputation: 59

This one could be off the wall, and personally haven't seen it documented anywhere, but when setting up the global tool in config is super important.

For example:

enter image description here

The name of that particular install is node, if I try to call it with

tool 'npm'

It's not going to work. This is a shot in the dark, but it caught me once before.

Upvotes: 2

Related Questions