I have installed nvm on my Windows runner and successfully installed two Node.js versions: 16.15.0 and 6.9.1. When I try to switch between these versions manually using the command nvm use {version}
on the runner, it works as expected.
However, when I try to switch between Node.js versions using the same nvm use {version}
command in the Bitbucket pipeline YAML file, it doesn't work. The pipeline doesn't switch the Node.js version as intended.
Here are the details:
nvm use {version}
in the script.How can I achieve this Node.js version switch within the Bitbucket pipeline?
Any help or examples would be greatly appreciated!
Same here, the pipeline just hangs on execution of the (any, actually) `nvm` command.
- nvm help -> hangs
- nvm list -> hangs
- nvm use -> hangs
Hi Tobias,
Please see my reply below:
If you are still experiencing issues, please create a new question in community via https://community.atlassian.com/t5/forums/postpage/board-id/bitbucket-questions and we will look into it.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That fixed it. Appreciate it!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yogesh,
May I know which build image you are using in your YML configuration, and if you are performing install commands for both versions as part of your build script?
I will also need the error you're receiving.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ben, I'm using window server 2019 as runner. Im using following commands through script:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yogesh,
Are you still experiencing issues with this?
If so, can you please let me know what version of nvm-windows do you have installed on this server?
You can find that out by running
nvm --version
I was able to reproduce this with nvm version 1.1.12. My Windows machine was also showing the error indicated in this issue:
As per the suggestions on this issue, I uninstalled nvm and then installed again the nvm version 1.1.11, and then the commands worked as expected from the Pipelines build.
Can you please give it a try?
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.