You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I noticed the following message after every step in my pipeline:
N/A: version "v18" is not yet installed
Which seemed strange because I am not using nvm use in any step of my pipeline. But the message seems to be from nvm.
You can reproduce this by creating an empty repository with only a .nvmrc file and a very simple bitbucket-pipelines.yml like this.
.nvmrc
18
bitbucket-pipelines.yml
pipelines:
default:
- step:
name: Test
script:
- exit 0
Without any other code the pipeline logs the nvm message two times!
Why? Is there any documentation that states any nvm integration into Bitbucket Pipelines?
Hello @timspiekerkoetter ,
Thank you for reaching out to Atlassian Community!
The atlassian/default-image:1, that is the image use by default if you don't specify any in your YML file, does come with nvm, but pipelines itself does not specify a node version.
Since you have a .nvmrc file in the repository, nvm will try to use the node version specified in that file, which in your example was v18. As the atlassian/default-image:1 does not come with Node 18, nvm is throwing the error that this particular version was not found.
For further details on what is included in each version of atlassian/default-image you can refer to Pipelines - Default build environment.
In order to get rid of that error, you can use a different docker image in your step that either does not use nvm or that contains the node version that you are specifying in the .nvmrc file, as in the example below :
pipelines:
default:
- step:
name: Using image that contains node 18
image: node:18.0.0
script:
- exit 0
- step:
name: Using image that does not use nvm
image: ubuntu:latest
script:
- exit 0
Hope that helps! Let me know in case you have any questions.
Thank you, @timspiekerkoetter !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.