node.js - 将 npm 降级到旧版本

标签 node.js npm installation downgrade

我尝试更新 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 of npm, 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/

相关文章:

node.js - 从服务器端的http请求读取cookie年龄

android - Windows 8.1 64 位上的 PhoneGap 使用 Platform add android 命令出现错误

python - 与 `python setup.py install --user` 的结果混淆

javascript - Node : error while loading shared libraries: libicui18n. so.62:无法打开共享对象文件:没有这样的文件或目录

c++ - 错误 MSB8007 : The Platform for project XXX is invalid. 平台 ='x64'

linux - 尝试安装程序,不断出现问题

包含数据文件的 Python 包

javascript - 如何在 Node.js 中读取文件?

node.js - 通过Docker镜像选择Node变量LISTEN和SERVER

node.js - 以html格式显示npm审计漏洞