Components: Allow @angular/core ^5.0.0 and 5.0.0-rc.* as peer dependencies of material and cdk

Created on 13 Oct 2017  ยท  12Comments  ยท  Source: angular/components

Bug, feature request, or proposal:

We know that the latest versions of material and cdk are compatible with the latest @next version of Angular because that's what we use at Google. We should therefore configure the peer dependencies of the npm packages to support both the @lastest as well as @next version.

What is the expected behavior?

No installation warnings from npm/yarn

What is the current behavior?

warning "@angular/[email protected]" has incorrect peer dependency "@angular/core@~4.4.4".
warning "@angular/[email protected]" has incorrect peer dependency "@angular/common@~4.4.4".
warning "@angular/[email protected]" has incorrect peer dependency "@angular/core@~4.4.4".
warning "@angular/[email protected]" has incorrect peer dependency "@angular/common@~4.4.4".

Most helpful comment

There will be a release on Monday that resolves this.

All 12 comments

Angular 5 has now been released, so this affects quite alot of people now.

Running a simple "ng new" and "yarn add @angular/material" directly puts one into this situation.
Are there already any plans to get this addressed?

@pfeigl I believe it has been addressed in #6018 and #8177 and will be available in the next release.

There will be a release on Monday that resolves this.

That's great, thanks!

Awesome news! Thanks for handling this so quickly guys!

no work with me too

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

I'm running
node v6.11.1
npm v3.10.10

I ran the following commands on osx
npm install -g @angular/cli
ng new my-app
cd my-app
npm install --save @angular/material @angular/cdk

[email protected] /Users/xxxxxxxxxxx/projects/xxxx/xxxxxxxxx
โ”œโ”€โ”€ @angular/[email protected]
โ”œโ”€โ”€ UNMET PEER DEPENDENCY @angular/[email protected]
โ”œโ”€โ”€ UNMET PEER DEPENDENCY @angular/[email protected]
โ””โ”€โ”€ @angular/[email protected]

npm WARN [email protected] requires a peer of @angular/compiler@^2.3.1 || >=4.0.0-beta <5.0.0 but none was installed.
npm WARN [email protected] requires a peer of @angular/core@^2.3.1 || >=4.0.0-beta <5.0.0 but none was installed.

I updated npm to v5.5.1 and now I am only getting the warnings
npm WARN [email protected] requires a peer of @angular/compiler@^2.3.1 || >=4.0.0-beta <5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@^2.3.1 || >=4.0.0-beta <5.0.0 but none is installed. You must install peer dependencies yourself.

@WilliamAllworth : For the warnings you can update codelyzer manually to version 4.0.1 in package.json

This was resolved with rc0

How do I get the fix, I still get this with rc.1
new project (ng new)
npm: 5.5.1
Angular CLI: 1.5.3
Node: 8.9.0
@angular/cdk: 5.0.0-rc.1
@angular/cli: 1.5.3
@angular/material: 5.0.0-rc.1

npm ERR! peer dep missing: @angular/compiler@^2.3.1 || >=4.0.0-beta <5.0.0, required by [email protected]
npm ERR! peer dep missing: @angular/core@^2.3.1 || >=4.0.0-beta <5.0.0, required by [email protected]

The old peer dep requirement is coming from codelyzer. Please update to the
latest version and it that doesn't help file an issue for codelyzer to
update the dep.

On Tue, Nov 21, 2017, 10:35 AM Thor Collard notifications@github.com
wrote:

How do I get the fix, I still get this with rc.1
new project (ng new)
npm: 5.5.1
Angular CLI: 1.5.3
Node: 8.9.0
@angular/cdk: 5.0.0-rc.1
@angular/cli: 1.5.3
@angular/material: 5.0.0-rc.1

npm ERR! peer dep missing: @angular/compiler@^2.3.1 || >=4.0.0-beta
<5.0.0, required by [email protected]
npm ERR! peer dep missing: @angular/core@^2.3.1 || >=4.0.0-beta <5.0.0,
required by [email protected]

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/angular/material2/issues/7780#issuecomment-346120056,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANM6D0KdDAMUS0OqkF21DslfWwQAZ5tks5s4xf3gaJpZM4P49ic
.

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