Jandre van Zyl
Jandre van Zyl

Reputation: 1

Mismatch with Angular material and Angular 4

In get the following error after having done an npm install.

@angular/material/core/typings/index.d.ts, found version 4, expected 3, resolving symbol

How can I install a the specific version of angular material so that I can realove this error.

My pacakage json looks like this

"@angular/animations": "^4.4.6",
"@angular/cdk": "github:angular/cdk-builds",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/material": "github:angular/material2-builds",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"@ng-idle/core": "^2.0.0-beta.12",
"@ng-idle/keepalive": "^2.0.0-beta.12",
"angular2-moment": "^1.7.0",
"angular2-recaptcha": "^0.6.0",
"angulartics2": "^3.3.0",
"bootstrap": "^3.3.7",
"chartjs": "^0.3.24",
"core-js": "^2.4.1",
"file-saver": "^1.3.3",
"financejs": "^4.1.0",
"moment": "^2.18.1",
"ng2-ckeditor": "^1.1.9",
"ng2-currency-mask": "^4.4.1",
"ng2-slim-loading-bar": "^4.0.0",
"ngx-toastr": "^6.2.0",
"primeng": "^4.3.0",
"rxjs": "^5.1.0",
"web-animations-js": "^2.3.1",
"zone.js": "0.8.14"

Upvotes: 0

Views: 650

Answers (1)

Z. Bagley
Z. Bagley

Reputation: 9270

You're using a snapshot of the most recent release.

A snapshot build with the latest changes from master is also available. Note that this snapshot build should not be considered stable and may break between releases.

Uninstall the snapshot builds for material and cdk:

npm uninstall --save angular/material2-builds angular/cdk-builds

Install the most recent stable

npm install --save @angular/material @angular/cdk

Also note:

You are using several npm packages labeled ng2, and these may require an older version and your more recent primeng requires a more recent material. You may not be able to use the older packages and newer primeng at the same time if they require different version of material (which may cause this error)

Upvotes: 1

Related Questions