After moving to the recommended machine image
nvm alias default <some_version> is unexpectedly not persisted anymore for subsequent steps.
Related solutions like Nvm does not change Node version on machine did not work.
I figured out a workaround but would prefer that
nvm alias works as officially documented and defaults are set for each step if configured.
What helped is adding
nvm use default to the BASH_ENV after installing and aliasing the required node version, for example:
- run: name: "Setup node" command: | set -e nvm install v12.17.0 nvm alias default v12.17.0 - run: name: "Enforce nvm use default" command: | echo "nvm use default" >> $BASH_ENV