material icon indicating copy to clipboard operation
material copied to clipboard

Unmet peer dependencies on angular update to 1.6.0 from 1.5.9

Open d4lek opened this issue 9 years ago • 25 comments

Hey guys, I have following problem on latest update to angular 1.6.0

Actual Behavior: On npm update from angular 1.5.9 to 1.6.0 caused npm to throw dependency errors

npm WARN [email protected] requires a peer of angular@>=1.3 <1.6 but none was installed. npm WARN [email protected] requires a peer of angular-animate@>=1.3 <1.6 but none was installed. npm WARN [email protected] requires a peer of angular-aria@>=1.3 <1.6 but none was installed. npm ERR! code 1

and ng-model-options stopped working throughout the application for md-select also including $$mdSelectId for every object selected.

Angular Versions: *

  • Angular Version: ^1.6.0
  • Angular Material Version: ^1.1.1
  • Angular Animate: ^1.5.6
  • Angular Area: ^1.5.6

Anyone else had anything like that recently?

Thanks

d4lek avatar Dec 16 '16 13:12 d4lek

David, Disclaimer: I'm a complete noob trying to learn Angular and Material simultaneously. That said, I'm getting the exact same dependency errors. I cloned the angular-seed git to local repo, then tried to install material into the seed via npm.

Not sure if it's a directory thing or what. I noticed the seed puts angular in bower_components, and material in node_modules. I tried moving stuff around, manually adding the entirety of 1.5.9 into my angular directory, but I'm still getting the same warnings and errors.

JodyJSmith avatar Dec 16 '16 16:12 JodyJSmith

Seems like downgrading following 1.6.0's to 1.5.9's solves dependency issues, and also ng-model-options comes back to function normally.

├── UNMET PEER DEPENDENCY [email protected]
├── UNMET PEER DEPENDENCY [email protected]
├── UNMET PEER DEPENDENCY [email protected]
└── [email protected] 

d4lek avatar Dec 16 '16 19:12 d4lek

I also found out about this the hard way from doing an npm update as well. Looks like we're sticking with 1.5.9 until Angular Material supports 1.6.0.

stevemrd avatar Dec 20 '16 14:12 stevemrd

They just released angular 1.6.1 which looks like it may fix the ngmodeloptions

fetters5 avatar Dec 23 '16 15:12 fetters5

+1

Galindo-janrain avatar Dec 23 '16 19:12 Galindo-janrain

Nope, still broken. Angular Material has a < 1.6 version requirement.

npm WARN [email protected] requires a peer of angular@>=1.3 <1.6 but none was installed. npm WARN [email protected] requires a peer of angular-animate@>=1.3 <1.6 but none was installed. npm WARN [email protected] requires a peer of angular-aria@>=1.3 <1.6 but none was installed.

Glad to see they've been steadily releasing new Angular versions at least, but my current node projects are unable to take advantage of this until Angular Material is updated to require the new Angular version. :(

stevemrd avatar Dec 27 '16 15:12 stevemrd

I have the same problem in my project:

npm WARN [email protected] requires a peer of angular@>=1.3 <1.6 but none was installed. npm WARN [email protected] requires a peer of angular-animate@>=1.3 <1.6 but none was installed. npm WARN [email protected] requires a peer of angular-aria@>=1.3 <1.6 but none was installed.

My boss ask me to resolve this, but I don't know what to do.Is really related with angular 1.6 incompatibility or is a other thing?

Kappyh avatar Dec 27 '16 19:12 Kappyh

@Kappyh you will have to downgrade Angular to the latest 1.5.x release for this to work.

As of this post, the latest 1.5.x version of AngularJS is 1.5.10.

npm upgrade [email protected] npm upgrade [email protected] npm upgrade [email protected]

Don't run "npm update" until this issue is resolved. You can still upgrade other packages individually with "npm update package@version"

I recommend keeping all other angular components at this version to avoid any further breakage.

stevemrd avatar Dec 27 '16 19:12 stevemrd

I am facing the same issue. I would like to use angular1.6 since its a new project. Is there any possibility of making it compatible with angular 1.6?

vatsalpande avatar Dec 28 '16 06:12 vatsalpande

The unmet peer dependency warning is only a warning. While 1.6.0 had some major issues with ngMaterial, it seems that many (not sure if "all") were fixed as of ng 1.6.1. In my case I’m using ngMaterial + 1.6.1 without seeing any problems so far. I’m not using every component/feature though, so I can’t say how meaningful that is — YMMV.

bathos avatar Dec 28 '16 07:12 bathos

I wrote ng-model-options issue detail at #10192 (comment). I drop it here in case it is useful for anyone else.

tugrulelmas avatar Jan 02 '17 18:01 tugrulelmas

Update: for md-datepicker (and perhaps other components, but this is the only one that has had this issue so far for me), you will need to enable the old assign-bindings-to-instance-before-constructor-is-invoked behavior with $compileProvider.preAssignBindingsEnabled(true).

bathos avatar Jan 02 '17 22:01 bathos

@bathos Update: for md-datepicker (and perhaps other components, but this is the only one that has had this issue so far for me), you will need to enable the old assign-bindings-to-instance-before-constructor-is-invoked behavior with $compileProvider.preAssignBindingsEnabled(true).

Solved my only problem . Thank you!!! :+1:

Kappyh avatar Jan 03 '17 12:01 Kappyh

The datepicker issue was reported in https://github.com/angular/material/issues/10168 and the fix is also listed there. The fix did work for me, but the unmet peer dependency issue should be kept separate. This can be fixed by the angular material team releasing a version which depends on <= angular 1.6.

So far, the datepicker component has been the only issue with angular material 1.1.1 and angular 1.6.

stevemrd avatar Jan 03 '17 15:01 stevemrd

This issue will be address with the fixes to #10111.

ThomasBurleson avatar Jan 03 '17 17:01 ThomasBurleson

+1

rochapablo avatar Jan 12 '17 10:01 rochapablo

@bathos Be aware of implications if using ES6 classes

Disabling (by default) the pre-assignment of bindings on controller instances, which helps with support for native ES6 classes

https://docs.angularjs.org/guide/migration#migrating-from-1-5-to-1-6

ghost avatar Jan 20 '17 11:01 ghost

Good point. I am, actually, but since the project is in Electron, I don’t have to worry about browser differences in the toString results for constructors created with class syntax — my own classes will pass Angular’s regex test and get instantiated the new way, while just 3rd party libs get the old behavior. But it’s true that if using class syntax (untranspiled) and you do not have environmental assurances, you could run into problems with browsers that support the syntax but do not return something Angular recognizes as class syntax from toString.

bathos avatar Jan 24 '17 02:01 bathos

I have the same issue, but as I am planning to use only the Card, I don't think it will be too much of a problem.

PedroF20 avatar Feb 07 '17 16:02 PedroF20

Will there be a new release soon?

PedroF20 avatar Mar 03 '17 15:03 PedroF20