ERROR in Metadata version mismatch for module /node_modules/angular2-cool-storage/index.d.ts, found version 4, expected 3,

蹲街弑〆低调 提交于 2019-12-05 05:46:33

It seems there are a package compatibility problem, you should follow this guide to upgrade packages to angular 5 to make compatible versions for packages, I've tried it and it worked well

npm install @angular/animations@^5.0.0 @angular/common@^5.0.0 @angular/compiler@^5.0.0 @angular/compiler-cli@^5.0.0 @angular/core@^5.0.0 @angular/forms@^5.0.0 @angular/http@^5.0.0 @angular/platform-browser@^5.0.0 @angular/platform-browser-dynamic@^5.0.0 @angular/platform-server@^5.0.0 @angular/router@^5.0.0 typescript@2.4.2 rxjs@^5.5.2

The message seems clear : You need a version of angular core and common that is at least 5.0.0.

Your package file show a 4.4.3 version.

Try updating your packages, or downgrading your dependencies, and try again !

For package consistency, I updated my package.json file. Removed the caret(^) from the package name so now it is not updating package headers. It forces npm to stick with the specified version only.

"angular2-cool-storage": "^3.1.0" => "angular2-cool-storage": "3.1.0"

Check package version which is compatible earlier with the same angular version and specify those entries without ^ in package.json if auto upgardation of package occurs Metadata version mismatch.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!