NodeJS Plugin:in windows : npm commends not working

34 views
Skip to first unread message

bolleypally vijay kumar

unread,
Oct 18, 2016, 11:29:44 AM10/18/16
to Jenkins Users
1. I'm trying to print node and npm version in a jenkins jobs in windows machine

I dont wan to use Auto install so i gave physical location of node folder due to some config problems in widows with NodeJS plug in i also done(1. In the windows nodejs install folder add a new folder "bin" and copy in the node.exe) but still showing command not found for npm

Please find ATTACHED Screens for more details

i also found few open issues like

Could you please suggest are the above issues blocking me or is there any other look around exist for my problem

Thanks
Error.png
JOb_Config.png
Local_directory.png

Eric Pyle

unread,
Oct 18, 2016, 11:54:43 AM10/18/16
to jenkins...@googlegroups.com

It looks like it's failing because it expects to find bash shell commands dirname and uname. Do you have Cygwin or some similar package installed to make those commands available?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1446a133-b4b5-421c-82a4-8a66b2f5cd01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bolleypally vijay kumar

unread,
Oct 20, 2016, 7:38:05 AM10/20/16
to Jenkins Users
Hi Eric,

Thanks for the hep

i installed Cygwin for windows and set Path respectively now able to run all Linux commands in windows cmd but when i run the job its shown error was "/usr/bin/dirname: missing operand

Please find ATTACHED Screens

My question is why dirname command was invoked when i'm printing npm version ?

bolleypally vijay kumar

unread,
Oct 20, 2016, 7:39:33 AM10/20/16
to Jenkins Users
ATTACHMENT 


On Tuesday, 18 October 2016 20:59:44 UTC+5:30, bolleypally vijay kumar wrote:
Whythis.png

Eric Pyle

unread,
Oct 20, 2016, 9:20:52 AM10/20/16
to jenkins...@googlegroups.com, bolleypally vijay kumar

The 'dirname' command is used to separate the final directory name from a path. The plugin code must be calling it. Can you execute the same commands interactively on the same node without error? Also, it appears that you may be using the "sh" pipeline command on a Windows node, which is not recommended, and many people have reported problems doing so. Use the "bat" command instead.

Also, I am sending this reply to the Jenkins list, so that others more knowledgeable about the NodeJS plugin may be able to help.

Regards,
Eric


On 10/20/2016 6:14 AM, bolleypally vijay kumar wrote:
Hi Eric Pyle,

Thanks for your help

as you mentioned i installed Cygwin and added to path and able to access all Linux commands in windows cmd now when i run the job  error was different '/usr/bin/dirname: missing operandPlease find ATTACHED Screens for more details
My question is why dirname command getting invoked when im trying to print npm version
--

bolleypally vijay kumar

unread,
Oct 20, 2016, 9:26:39 AM10/20/16
to Eric Pyle, jenkins...@googlegroups.com

Thanks Eric I will try this

bolleypally vijay kumar

unread,
Oct 21, 2016, 6:14:52 AM10/21/16
to Jenkins Users
Thanks Eric for all your help the problem solved when i made shell run mode to Windows batch mode

Problem Solved

On Tuesday, 18 October 2016 20:59:44 UTC+5:30, bolleypally vijay kumar wrote:
Reply all
Reply to author
Forward
0 new messages