我尝试更新 npm
看看它是否能解决我们遇到的一些依赖问题,现在我想降级到开发团队其他成员正在使用的版本。如何安装旧版本?
我根据 About npm
CLI versions 上的说明更新了 npm
:
The latest release of
npm
The latest release of
npm
is the most recent stable version. When you install Node.js,npm
is automatically installed. However,npm
is released more frequently than Node.js, so to install the latest stable version ofnpm
, on the command line, run:
npm install npm@latest -g
最佳答案
只需将 @latest
替换为您要降级到的版本号。我想降级到 3.10.10 版本,所以我使用了这个命令:
npm install -g npm@3.10.10
如果您不确定应该使用哪个版本,请查看 version history .例如,可以看到 3.10.10 是 npm 3 的最新版本。
关于node.js - 将 npm 降级到旧版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46415343/