Jenkins build fails (newman: required node version >=10) for newman project Execute Shell newman run

Hi, I am trying to run my Postman collection from Jenkins. I have created a freestyle project and in the Build > Execute Shell - I have given command as below

newman run “

The Build is failing and I see below console output:

Started by user Admin User
Running as SYSTEM
Building in workspace /var/lib/jenkins/workspace/Postman
[Postman] $ /bin/sh -xe /tmp/
+ newman run
newman: required node version >=10
Build step ‘Execute shell’ marked build as failure
Finished: FAILURE

Please help me resolve this problem. OS = Ubuntu 18.04.5 LTS

NOTE: I am able to successfully able to run the collection from command line. And node version is above 10
node -v = 10.2.0 ; npm -v = 5.6.0 ; newman -v = 5.2.0

Are you able to echo the Node version from that Jenkins job?

Hi Danny, thanks for your question. I’m new to jenkins and do not know how to check the node version.
Could you please help me to find the version being used and how to set it to the required version?
If you could guide me with any site, I can go through it.

In the script, you have added to run Newman add the echo statement in there. The same as you would use to return the version in your terminal.