Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Node js version update on Bamboo

Andriy Drozdenko
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 1, 2017

Hello, 

how to update Node js version to higher one? Currently

(current: {"node":"0.10.40","npm":"3.3.6"})

Wanted atleast node version 4.

Thanks in advance.

1 answer

1 vote
thePair
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 1, 2018

Hello Andriy! Hope you're doing good!

 So, this question is more related to updating Node itself. I've made some testing in a Ubuntu 18.04 that I have (running Bamboo Server in its latest version as off today, 6.7.1). 

PS: For the below, make sure to execute proper backups, snapshot or whatever needed to rollback any change you make in your environment. 

What I've tested:

- Installed node 0.10.40 from the main repository: http://nodejs.org/dist/

- If you're not sure how to install, you can always refer to the node documentation, i.e. here:

https://github.com/nodejs/help/wiki/Installation

 

- As soon as I've installed, I've let my server to re-check its local agent capabilities:

Upper Right Cog --> Agents --> Server Capabilities...

And I got the server to recognise my node installation. 

Screen Shot 2018-11-01 at 15.06.31.png

 

I've then proceeded to create a task to run a nodeJS script, so I could check If my node was working and on the right version. Something like this:

console.log('This is a testing NodeJS');
console.log('This is the actual Node Version');
console.log(process.version);

The result, while I run the task, is expected, as you can see at the task logs screen below:

Screen Shot 2018-11-01 at 13.18.55.png

- Since what we wanted was to update the actual node version, I've used npm and the 'n' module for that, with some little trick.

The main article you can follow to perform this update, could be: 

https://askubuntu.com/questions/426750/how-can-i-update-my-nodejs-to-the-latest-version

You should:

sudo npm cache clean -f
npm config set strict-ssl false <-- This is the trick, since the certificates for NPM are supposed to be outdated, due to being an old version. This avoids the "npm ERR! Error: SSL Error: CERT_UNTRUSTED you may get
sudo npm install -g n
sudo n stable

The recent stable version of node is v11.0.0. As soon as you update, since npm is supposed not to change default installation paths you should be able to view the updated version of node when you run the task again. Like I did:

Screen Shot 2018-11-01 at 15.00.13.png

I assume that the results would kinda be the same for remote agents.

If you have any other enquiry in regards to Node inside Bamboo, please make sure also to check our documentation here:

https://confluence.atlassian.com/bamboo/getting-started-with-node-js-and-bamboo-687213472.html

 

Cheers!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events