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:
- Operating System: Windows
- nvm-windows is installed, and I can switch Node.js versions manually.
- The pipeline fails to switch the version programmatically using
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!