Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning while installing Angular Material

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
like image 382
Manu Chadha Avatar asked May 23 '18 20:05

Manu Chadha


People also ask

Which command is used to install angular material?

Step 1: Install Angular Material and Angular CDK You can use either the npm or yarn command-line tool to install packages.


1 Answers

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",
    ...
 },
like image 154
Maximilian C. Avatar answered Oct 22 '22 01:10

Maximilian C.