如何在我的项目中使用 npm@6.6.7?

huangapple go评论50阅读模式
英文:

How do I use npm@6.6.7 for my project when npm

问题

6.6.7 在我的 package-lock.json 中。
npm view npm version 输出 9.6.7。
npm -v 输出 9.5.1。
npm list 输出 npm@9.6.7
npm list -g 输出包括 npm@9.6.7 的列表。
Node@18.16.0 已安装。

英文:

6.6.7 is in my package-lock.json.<br/>
npm view npm version outputs 9.6.7.<br/>
npm -v outputs 9.5.1.<br/>
npm list outputs npm@9.6.7.<br/>
npm list -g outputs list including npm@9.6.7.<br/>
Node@18.16.0 is installed.<br/><br/>
Anyone out there available to help me out with this one?

答案1

得分: 1

你可以通过执行以下命令降级你的 npm 版本:

npm install -g npm@X.Y.X

如果你想确保你正在寻找的版本是正确的,你可以查看版本历史页面

顺便说一下,如果你使用的是 Linux 或 macOS,你可以使用nvm。它安装起来非常容易,你可以快速切换你的 Node 环境。

英文:

You can downgrade your npm version by executing:

npm install -g npm@X.Y.X

If you want to make sure the version you are looking for is the right one, you can check the version history page.

By the way, if you're using Linux or macOs, you can use nvm. It's pretty easy to install, and you can quickly alternate your Node enveironment.

huangapple
  • 本文由 发表于 2023年6月6日 01:55:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/76408891.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定