Resolve nvm install Node Issues on macOS Big Sur M1 Chip - A Step-by-Step Guide
Автор: vlogize
Загружено: 2025-05-27
Просмотров: 8
Описание:
Struggling to install Node.js on your new MacBook Pro with M1 chip? Follow our easy step-by-step guide to resolve `nvm install node` errors encountered on macOS Big Sur.
---
This video is based on the question https://stackoverflow.com/q/67254339/ asked by the user 'adityaatri' ( https://stackoverflow.com/u/13192685/ ) and on the answer https://stackoverflow.com/a/67254340/ provided by the user 'adityaatri' ( https://stackoverflow.com/u/13192685/ ) at 'Stack Overflow' website. Thanks to these great users and Stackexchange community for their contributions.
Visit these links for original content and any more details, such as alternate solutions, latest updates/developments on topic, comments, revision history etc. For example, the original title of the Question was: nvm install node fails to install on macOS Big Sur M1 Chip
Also, Content (except music) licensed under CC BY-SA https://meta.stackexchange.com/help/l...
The original Question post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license, and the original Answer post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license.
If anything seems off to you, please feel free to write me at vlogize [AT] gmail [DOT] com.
---
Troubleshooting nvm install node on macOS Big Sur with M1 Chip
If you’re a developer looking to install Node.js using nvm (Node Version Manager) on your newly acquired M1 MacBook Pro, you may have hit a roadblock. Many users have reported issues during the installation process, particularly those with macOS Big Sur and the M1 chip. If you've encountered an error message that reads:
[[See Video to Reveal this Text or Code Snippet]]
Then you’re not alone, and we're here to help you navigate this issue.
Understanding the Problem
The M1 chip is based on ARM architecture, while many existing Node.js versions (especially those before version 15) are built for the x86 architecture. This means that when trying to install these versions using nvm, you might end up facing compatibility issues.
Key Takeaway
Node versions lower than 15 do not work on Apple Silicon (ARM) machines.
To install versions under v15, you'll need to utilize Rosetta 2 to emulate x86 compatibility.
Step-by-Step Solution
Here’s how you can successfully install Node.js on your M1 MacBook Pro using nvm while bypassing the errors:
Step 1: Open Terminal in Rosetta 2 Mode
Navigate to Applications
Go to your Applications folder on your Mac.
Locate Terminal
Find the Terminal application.
Get Info
Right-click on the Terminal app and select “Get Info.”
Open Using Rosetta
Check the box labeled “Open using Rosetta.” This enables Terminal to run under the x86 architecture.
Restart Terminal
Close and reopen Terminal for the changes to take effect.
Step 2: Switch to x86 Environment
Once Terminal is restarted, you can set it to run under the x86 architecture by executing the following command:
[[See Video to Reveal this Text or Code Snippet]]
This command starts a new zsh shell that operates under the x86 environment.
Step 3: Install Node.js Using nvm
Now you can use nvm to install Node.js without encountering the previous errors. For example, you can install a specific version of Node.js using:
[[See Video to Reveal this Text or Code Snippet]]
Feel free to replace <some_version> with the desired version number. You should now be able to install any version of Node, including multiple versions as needed.
Conclusion
Installing Node.js on macOS Big Sur with the M1 chip doesn’t have to be a stressful experience. By using Rosetta 2, you can bypass compatibility issues and ensure a smooth installation process. Now that you have the steps, you're ready to code!
Remember, for newer versions of Node (15 and above), you should not face these issues, as they are built to support ARM architecture natively. Happy coding!
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: