-
Type:
Suggestion
-
Resolution: Fixed
-
None
-
Component/s: None
-
None
Problem
When executing the Node/NPM build task, Bamboo calls node/npm with the fully qualified path, e.g. /usr/local/bamboo/tools/node/node-v4.2.1/bin/node:
Log output
command 19-Sep-2016 18:01:06 Beginning to execute external process for build 'Bamboo Tests - Java Script - Default Job #1 (BT-BTJS-JOB1-1)' ... running command line: /usr/local/bamboo/tools/node/node-v4.2.1/bin/node test.js ... in: /usr/local/bamboo/agent-home/xml-data/build-dir/BT-BTJS-JOB1 ... using extra environment variables: ... bamboo_capability_system_builder_node_Node_js_6_6_0=/usr/local/bamboo/tools/node/node-v6.6.0/bin/node ... bamboo_capability_system_builder_node_Node_js_4_2_1=/usr/local/bamboo/tools/node/node-v4.2.1/bin/node ...
This is not always enough. With npm for example, you can define scripts in package.json, e.g.
"scripts": { "doSomething": "node test.js", }
NPM delegates scripts to the runtime environment and therefore rely's on node executable being on the PATH. To workaround this customers have to manually set the node path with a script task.
Improvement
Bamboo Node and npm task should add /path/to/node/bin dynamically to the PATH