Node.js belowed v15 has a problem on Mac M1. We can't run legacy Node.js project with simply npm i
.
What we have to do is:
1) Install Rosetta in our terminal
softwareupdate --install-rosetta
2) Make our terminal app run on Rosetta mode
by goto Application / iTerm (let's say we're using iTerm)
left click to show popup menu and click "Get info"
then tick on "Open with Rosetta"
3) Restart the terminal app
4) Check that we're using the right CPU
arch # it should return something like "i386" not "arm64"
After that I can run nvm install 12
and npm i
without any error
Note:
It's wotk on my end but I''m not sure about you guys or event my new Mac :D
Top comments (0)