本文介绍了Node Version Manager 在 M1 Macbook Air 上运行很慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前发现在我的 M1 Macbook 上运行节点版本管理器(使用 zsh 控制台),它运行节点命令的速度非常慢.

I am currently finding that running Node Version Manager on my M1 Macbook (using zsh console), it is running node commands very slowly.

npm 安装可能需要 30 多分钟才能完成.但是,如果我不使用 NVM 并决定直接安装相同版本的节点,则命令的运行速度会比预期快得多(npm 安装需要 2 分钟).

An npm install can take 30+ minutes to complete.However, if I don't use NVM and decide to install the same version of node directly, the commands runs much faster as expected (2 minutes for an npm install).

我尝试将不同版本的节点与 NVM 一起使用,但命令仍然运行缓慢.我还尝试使用 Rosetta 运行终端,但它们仍然需要很长时间才能运行.

I have tried using different versions of node with NVM and the commands still run slow.I have also tried to run terminal using Rosetta and they still take forever to run.

环顾四周,我看到人们抱怨 NVM 启动缓慢,但我的加载几乎立即加载,只是运行需要很长时间的命令.

Looking around I have seen people complain about NVM starting slowly but mine loads almost instantly, its just commands running that takes a long time.

这只是 M1 芯片问题还是我做错了什么?

Is this just an M1 chip issue or have I possibly done something wrong?

推荐答案

我有一台 Macbook Air M1,但它几乎无法使用.需要使用 Node 12.16,一个小项目的 npm install 大约需要 30 分钟.奇怪的是 CPU 百分比利用率一直在 30-40% 左右.

I have a Macbook Air M1 and it's almost unusable. Needed to use Node 12.16 and the npm install of a small project was about 30 minutes. Weird thing was the CPU % utilization was about 30-40% all the time.

我曾尝试使用终端强制 Rosetta 2,但性能和安装时间大致相同.

I have tried using the terminal forcing Rosetta 2, but performance and install time was about the same.

这篇关于Node Version Manager 在 M1 Macbook Air 上运行很慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 21:26