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

Pipelines seems to execute nvm use after every step

diego April 5, 2023

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.




- step:
name: Test
- 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?

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 11, 2023

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 : 

- step:
name: Using image that contains node 18
image: node:18.0.0
- exit 0
- step:
name: Using image that does not use nvm
image: ubuntu:latest
- exit 0

Hope that helps! Let me know in case you have any questions.

Thank you, @timspiekerkoetter !

Patrik S

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events