首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不能重新安装旧离子工程

不能重新安装旧离子工程
EN

Stack Overflow用户
提问于 2022-11-12 17:39:22
回答 2查看 20关注 0票数 0

我有一个离子项目,我已经有一段时间没有更新了。

该项目运行良好,我在许多设备上安装了离子应用程序。

今天,我从git下载了代码,然后运行命令npm install,但是该命令以依赖项错误结束:

代码语言:javascript
复制
MacBook-Pro-di-Silvia:scorekeeper gottasilvia$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: scorekeeper@0.0.1
npm ERR! Found: rxjs@6.6.7
npm ERR! node_modules/rxjs
npm ERR!   rxjs@"^6.3.3" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer rxjs@"^5.5.0" from @angular/core@5.0.0
npm ERR! node_modules/@angular/core
npm ERR!   @angular/core@"5.0.0" from the root project
npm ERR!   peer @angular/core@"5.0.0" from @angular/common@5.0.0
npm ERR!   node_modules/@angular/common
npm ERR!     @angular/common@"5.0.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/gottasilvia/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/gottasilvia/.npm/_logs/2022-11-12T17_16_01_363Z-debug-0.log

我试着遵循建议的命令,但结果没有改变。

如何在没有依赖关系的情况下安装和更新所有软件包?

非常感谢

EN

回答 2

Stack Overflow用户

发布于 2022-11-13 16:08:47

您应该使用npm update更新它们,并且可能需要使用--legacy-peer-deps标记。如果它不起作用,您可以使用npm-check-update软件包,您可以全局安装它,或者像这样使用它:

代码语言:javascript
复制
$ npx npm-check-updates -u
$ npm i

或者您最终可以删除有问题的代码并逐一安装,如果您的代码太旧,并且您可能需要更改代码的某些部分,则此方法可能特别有用,您可以在安装它们时删除它们并检查每个包的代码。

票数 0
EN

Stack Overflow用户

发布于 2022-11-14 15:59:08

您需要安装适当的npm和节点,否则会遇到许多错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74415154

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档