Components: Installing Angular Material and Angular CDK (v. 5.2.4) is not working properly

Created on 30 Jun 2018  路  8Comments  路  Source: angular/components

Bug, feature request, or proposal:

The installation of Angular material as suggested in (https://v5.material.angular.io/guide/getting-started) via npm install --save @angular/material @angular/cdk installs version 6.3.1 of @angular/cdk and @angular/material which is not working with the following installed version of Angular, Angular CLI and Node:

Angular CLI: 1.7.4
Node: 6.11.0
OS: win32 x64
Angular: 5.2.11

What is the expected behavior?

The installation guide should have the right command to install the proper material version.

What is the current behavior?

A version is installed which breaks the app.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular CLI: 1.7.4
Node: 6.11.0
OS: win32 x64
Angular: 5.2.11

P4 docs

Most helpful comment

I agree it would be good if the v5 site specified the version. FYI, in case you weren't aware, you want to specify the version in your npm install command:

npm i @angular/material@5 @angular/cdk@5

All 8 comments

Angular Material 6 requires Angular 6.

@hakimio I am pretty aware of that fact. But if you're executing the steps given by the guide for version 5 - it is installing the wrong version and therefore breaks the application.

@szEvEz Ok, I see the issue with the documentation now. You are right.

Angular v6 : ng add @angular/material throws below error

@angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself.

anyone, is this the same issue? cannot proceed now?

@freelancersunil No, that's different. You can proceed by manually installing "@angular/cdk".

I agree it would be good if the v5 site specified the version. FYI, in case you weren't aware, you want to specify the version in your npm install command:

npm i @angular/material@5 @angular/cdk@5

Angular Material 6 requires Angular 6.

Thanks

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

julianobrasil picture julianobrasil  路  3Comments

jelbourn picture jelbourn  路  3Comments

dzrust picture dzrust  路  3Comments

Miiekeee picture Miiekeee  路  3Comments

Hiblton picture Hiblton  路  3Comments