简体   繁体   English

该项目使用RxJs 5.5.12版本,Angular v6不支持

[英]This project uses version 5.5.12 of RxJs, which is not supported by Angular v6

I was trying to run a downloaded project but it was giving me this error 我正在尝试运行一个下载的项目,但它给了我这个错误

Your global Angular CLI version is greater than your local version. 您的全局Angular CLI版本大于本地版本。 The local Angular CLI version is used. 使用本地Angular CLI版本。

So I updated cli to latest version.But now I am getting this error. 所以我将cli更新到了最新版本。但是现在我收到了这个错误。

This project uses version 5.5.12 of RxJs, which is not supported by Angular v6. 该项目使用RxJs 5.5.12版本,Angular v6不支持。

How can I update a specific dependency (in this case rxjs) to latest version? 如何将特定的依赖项(在本例中为rxjs)更新为最新版本?

Try running 尝试跑步

npm i rxjs@6 --save

It can work !! 它可以工作!

Go to package.json, change the below line: 转到package.json,更改以下行:

"rxjs": "^5.5.12"

to: 至:

"rxjs": "6.3.3"

Perform npm update, then ng serve. 执行npm更新,然后ng服务。
This should work. 这应该工作。

Try running following commands 尝试运行以下命令

npm i <module name>@<version>(optional) --save

example: -S is the alias of --save 示例:-S是--save的别名

npm i rxjs@latest -S

yarn add <module name>@<version>(optional)

Or 要么

yarn update <module name>@<version>(optional)
yarn update

ng update --all

This way you can update all or individual modules. 这样,您可以更新所有或单个模块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM