I try to run a webdriverio test from Jenkins and follow this . I installed the plugin nodeJSfor jenkins and in the global configuration tool for NodeJS added the name and installation directory as /usr/local/bin(the node executable file is in this folder)
In Jenkins, in the project configuration, in the build environment, I checked
Provide Node & npm bin/folder to PATH and select the host installation name from the previous step
But when I try to run npm install npm testby adding these commands to the execute shell command under Build and compiling it, I get this error
Building in workspace /Users/Shared/Jenkins/Home/workspace/wdio-project
[wdio-project] $ /bin/sh -xe /Users/Shared/Jenkins/tmp/hudson1478028169114509075.sh
+ npm install
/Users/Shared/Jenkins/tmp/hudson1478028169114509075.sh: line 2: npm: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE
source
share