Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

zsh: bad CPU type in executable: node

Writer Emily Wong

I have installed nvm using brew. After that, I installed node version of 16 through nvm and check the current version using node -v to see whether the node is working properly. However, when I install version 14 or any other previous versions and runs node -v, it gives this "zsh: bad CPU type in executable: node" message and I have no idea what to do about this, though, installing node v17 and running node -v works as expected. Below are the snippet of the said commands.

enter image description here

1 Answer

This is CPU related issue. It seems that your MacBook Air's CPU is Apple Silicon (M1).

You need update node version architecture on NVM.

softwareupdate --install-rosetta

Further details can be founded on NVM doc, "Macs with M1 chip" section.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy