7

I installed Angular Material and noticed several warnings on the console. Do I have incompatible or missing libraries?

c:/...>npm install --save @angular/material @angular/cdk
npm WARN @angular/[email protected] requires a peer of @angular/core@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/common@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/core@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/common@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ @angular/[email protected]
+ @angular/[email protected]
added 2 packages in 42.598s

1 Answer 1

2

You are using @angular/material in 6.1.0. This version is designed to work with Angular 6. It appears that you are using an earlier Angular version.

For Angular 5 you could use @angular/material in version 5.x.x by updating your package.json as follows:

"dependencies": {
    ...
    "@angular/cdk": "^5.2.5",
    "@angular/material": "^5.2.5",
    ...
 },
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.