首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >更新“角/cli”角/核心或npx“角/cli”13更新“角/核心”13角/cli@13不起作用

更新“角/cli”角/核心或npx“角/cli”13更新“角/核心”13角/cli@13不起作用
EN

Stack Overflow用户
提问于 2021-11-10 12:44:46
回答 1查看 5.1K关注 0票数 3

我正在尝试将我的角度cli和角核心从12升级到13,但是看起来存在对等依赖问题。有没有人面临过这个问题?

npx @角形/cli@13更新“角/核心”13角/cli@13

代码语言:javascript
复制
[![npm ERR! Could not resolve dependency:
npm ERR! dev @angular/compiler-cli@"~13.0.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: typescript@4.4.4
npm ERR! node_modules/typescript
npm ERR!   peer typescript@">=4.4.2 <4.5" from @angular/compiler-cli@13.0.0
npm ERR!   node_modules/@angular/compiler-cli
npm ERR!     dev @angular/compiler-cli@"~13.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.][1]][1]

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-11-11 01:59:23

每当我把我的角应用升级到更高的版本时,我就会遇到同样的问题。我总是使用--force命令,并成功地完成了升级。因此,只需添加--force命令,并确保在升级后测试应用程序。

代码语言:javascript
复制
npx @angular/cli@13 update @angular/core@13 @angular/cli@13 --force

此外,如果升级材料,也要做同样的事情:

代码语言:javascript
复制
npx @angular/cli@13 update @angular/material@13 --force
票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69913492

复制
相关文章

相似问题

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