jenkins has been installed successfully but stuck on bower installation with NodeJSInstallation Plugin

42 views
Skip to first unread message

Sarjerao Jadhav

unread,
Jul 24, 2017, 9:10:50 AM7/24/17
to Jenkins Users
Hello Guys,

I have installed Jenkins thr' official website on my local environment win7. I have completed setup by creating new admin user. 
I have spring boot project with jenkinsFile with mutiple branches but I would like to setup for particular branch.
So I have created Job using pipeline. I have selected pipeline script from SCM (Git/Bitbucket) then configured repository & branches to build & configured script path for jenkinsFile.
This is how my job is created.

I have installed plugin which is NodeJSInstallation plugin. & configured in global tool configuration at NodeJS section which is shown in following snapshot.




I tried to setup Global npm packages to install in different ways as below :-
npm install -g grunt-bower-cli
npm install -g bower
bower 1.8.0 grunt-cli

Please see the error log as below :- 
[Pipeline] tool
$ cmd /c "C:\Program Files (x86)\Jenkins\tools\jenkins.plugins.nodejs.tools.NodeJSInstallation\node-4.6.0\npm.cmd" install -g npm install -g npm
C:\Program Files (x86)\Jenkins\tools\jenkins.plugins.nodejs.tools.NodeJSInstallation\node-4.6.0\npm -> C:\Program Files (x86)\Jenkins\tools\jenkins.plugins.nodejs.tools.NodeJSInstallation\node-4.6.0\node_modules\npm\bin\npm-cli.js
C:\Program Files (x86)\Jenkins\tools\jenkins.plugins.nodejs.tools.NodeJSInstallation\node-4.6.0\npx -> C:\Program Files (x86)\Jenkins\tools\jenkins.plugins.nodejs.tools.NodeJSInstallation\node-4.6.0\node_modules\npm\bin\npx-cli.js
+ install AtTheRate 0.10.1
+ npm AtTheRate 5.3.0
+ npm AtTheRate 5.3.0
updated 2 packages in 89.036s
[Pipeline] stage
[Pipeline] { (check tools)
[Pipeline] sh
[C:\Program Files (x86)\Jenkins\workspace\test-project-v0.1] Running shell script
+ node -v
v6.10.0
[Pipeline] sh
[C:\Program Files (x86)\Jenkins\workspace\test-project-v0.1] Running shell script
+ npm -v
3.10.10
[Pipeline] sh
[C:\Program Files (x86)\Jenkins\workspace\test-project-v0.1] Running shell script
+ bower -v
C:/Program Files (x86)/Jenkins/workspace/test-project-v0.1 AtTheRate tmp/durable-4ecb94cf/script.sh: line 2: bower: command not found
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 127
Finished: FAILURE

Please help me to resolve the issue ?
Reply all
Reply to author
Forward
0 new messages