path for nodejs in bamboo
I have installed nodejs as an addon in Bamboo. When I create a task with node as executable and run the plan I get the below error
Starting task 'npm' of type 'com.atlassian.bamboo.plugins.bamboo-nodejs-plugin:task.builder.npm' Unable to find executable at usr/local/bin/npm
I want to know the path to be used while adding nodejs.
Below is the current path setup - node (Node.js) usr/local/bin/node
Please advice.
Comments (11)
-
-
Hello Jason,
I am using the web version of Bamboo, where I have installed Bamboo Node.js Support as a User installed add-on. from the marketplace listing.(Windows 8).
In Bamboo administration I see nodejs listed as an executable.
I want to know how to run npm install -g grunt-cli as a task in the plan using nodejs support plugin in bamboo in the browser.
Please advice.
Thanks much!
-
@vvdevbamboo, can you not just add an npm task and in the "Command" field in the configuration enter: "install -g grunt-cli" or something to that effect?
-
Have you actually installed node.js on the machine running Bamboo? Make sure you install node.js and then from Administration --> Server Capabilities click "Detect Server Capabilities" and make sure that Node.js shows up in the following screen. This is a prerequisite step for running the Bamboo Node.js plugin
-
Hey Jason/Issac,
When I run the "install -g grunt-cli" command in the "Command" field of the npm task I get the below error when I run the build -
Starting task 'npm' of type 'com.atlassian.bamboo.plugins.bamboo-nodejs-plugin:task.builder.npm' Unable to find executable at /bin/npm
... running command line: /bin/npm install -g grunt-cli
Yes Node.js plugin does show up on the screen since I have installed it as an add on. I see this in the manage add ons screens as well in the user installed add on's Bamboo Node.js Support.
When I see the server capabilities screen I see the label name node(Node.js) and under the heading - "Please enter the path to your executable" which I have set it to /bin/npm for now....
At the time of adding the path to the Node.js plugin what path should we use. When I use my system path where Nodejs is located that is "C:\Program Files\nodejs" and then run the build I get the below error -
Starting task 'npm' of type 'com.atlassian.bamboo.plugins.bamboo-nodejs-plugin:task.builder.npm' Unable to find executable at C:\Program Files\nodejs
... running command line: C:\Program Files odejs install -g grunt-cli
Also, it escapes the /n in the path and treats it as a new line....
Please advice.
Thanks much!
-
Don't use /bin/npm on Windows. It's not just a placeholder; it's the path to Node that the plugin will run.
Set the path to the executable node.exe wherever that is.
For example on my windows machine, I have the capability for nodejs set to "C:\Program Files\nodejs\node.exe"This might fix itself if you delete the NodeJs capability and redetect server capabilities with the button, but you've got to make sure that it's going to the correct node executable
-
Yes correct,
I have the below in the server capabilities...
I deleted the Node.js capability and added a new executable with the below path for my nodejs
node (Command) C:\Program Files\nodejs\node.exe cmd (Command) C:\Windows\system32\cmd.exe
Still runs into an error and is not able to find the executable. It is not able to find the command executable as well.. .
Please advice.
-
It shouldn't be listed as (Command). Delete it, and use the Detect Server Capabilities button to add it back. It should be listed as (Node.Js)
-
Yes, I had tried that before using the Add On. User-installed add-on's - Bamboo Node.js Support
This is under Manage add-ons.
When I check the server capabilities page I see the Executable node (Node.js) C:\Program Files\nodejs\node.exe
When you Detect Capabilities from the button nothing happens. We need to add a new executable using the Add Capability since it is not a Bamboo specific system capability.
The other capabilities when added automatically have a path populated in the text box, but not when you add nodejs.
Please advice.
-
I'm not sure why it's not auto-detecting yours, as it seems to be in the standard location, but can confirm that the auto-detect is working for me. If you'd like to hack on it, take a look at NodeCapabilityDefaultsHelper.java
-
- changed status to invalid
Hi @vvdevbamboo, I'm closing off this issue since it seems to be a misconfiguration issue rather than a bug.
- Log in to comment
Hi Anonymous,
If you're using Homebrew to manage your node install did you install it using the
--without-npm
flag?If you type
which npm
in the console what does it say?In order to avoid the need to configure a separate executable for npm the plugin looks in the same folder as the node executable for the npm executable.