Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Critical
-
Resolution: Not A Defect
-
Component/s: nodejs-plugin
-
Labels:None
-
Environment:java version "1.8.0_261" , OS = Ubuntu 18.04.4 LTS
-
Similar Issues:
Description
i have done nodejs installation from global-tool-configuration
after that When testing node version from pipeline its giving error.
PipeLine-Code
pipeline {
agent any
tools
{nodejs "node"} stages {
stage('Example') {
steps
}
}
}
I can't duplicate the problem that you're reporting. I installed the nodejs plugin, configured a node installer that I named "node-14.13.1" and then defined a pipeline job that uses the following script:
That declarative pipeline script was taken from the nodejs plugin online documentation with a modification of the agent definition to avoid agents in my environment that are not supported by the nodeJS installers.
I saw in your attached pictures that you were using node 12.18.4. I created a new installer for node 12.18.4, modified the job to use that installer, and confirmed that it worked as well.
You'll need to provide enough details that will allow others to duplicate the issue. See "How to report an issue" for the types of details that are most often needed.