Jenkins unable to find newman command in MacOs

I am facing an issue on my MacOS while running Newman command via Jenkins.

I have even tried a simple build with node and npm version check but it does not work either.

line 2: node: command not found
Build step ‘Execute shell’ marked build as failure
Finished: FAILURE

line 2: newman: command not found
Build step ‘Execute shell’ marked build as failure
Finished: FAILURE
Note: All commands like newman , node and npm .

I know this could be common issue but it. will be great to know.

Hey, @abhikulkarni.1988,

Make sure you’ve installed the Node.js plugin in Jenkins (Jenkins -> Manage Jenkins -> Manage Plugins). Then I believe you have to go to Jenkins -> Manage Jenkins -> Global Tool Configuration and setup the Node.js plugin.

After that, you should see an option to include Node.js in your Build Environment, named “Provide Node & npm bin/ folder to PATH”. Check that box.

This should give your build project access to node and npm.

Hope this helps.

Best,

Kevin