M1 error getting installed npm version: error running npm command: No preset version installed for command npm

Response from the bitrise team to the ticket:

I apologize for the inconvenience, our recent stack update brought some changes, notably our use of ASDF as the Ruby version manager. asdf was already in use on our stacks but one of the issues that users are facing is that If the project has a .node-version file in the project root, ASDF now tries to activate that version. Previously this file was ignored.

I have seen users resolve this by removing the .node-version alternatively you can add a script (step) that uses asdf to install the desired version.

asdf install nodejs <version you want>
asdf global nodejs <version you want>

I hope this information is useful, apologies for the inconvenience once again.

2 Likes