如何使Force NPM安装不推荐使用的软件包?

发布于 2025-02-07 14:33:03 字数 589 浏览 1 评论 0原文

我最近加入了一个团队,克隆了该项目并试图安装它。这是一个本地项目。

NPM安装失败。因此,我尝试手动安装包裹。也安装了一些第一个软件包,但是此软件包npm i @react-native-community/picker抛出以下错误:

“在此处输入映像说明”

我猜我猜是因为包含软件包折旧。知道如何强迫NPM安装它? (我无法更改该软件包,因为该项目在代码库中使用了)

指出,我已经安装了以下节点版本(我可以使用nvm ):

  • * 16.15.1(当前使用64位可执行文件)
  • 14.16.0
  • 12.9.1
  • 10.15.2
  • 8.16.2

I've recently joined to a team and cloned the project and tried to install it. It's a react native project.

npm install fails. So that I've tried to install packages one by one manually. Few first packages installed as well, but this package npm i @react-native-community/picker throws the following error:

enter image description here

I guess the issue is because of the package depreciation. Any idea how can I force npm to install it anyway? (I cannot change that package, because the project is using it inside the codebase)

Noted that I've the following node version installed (and I can change them using nvm):

  • * 16.15.1 (Currently using 64-bit executable)
  • 14.16.0
  • 12.9.1
  • 10.15.2
  • 8.16.2

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

姜生凉生 2025-02-14 14:33:03

您可以尝试以下命令强制安装:

npm install --force

You can try below command to force install:

npm install --force
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文