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.0Angular Material Version:
^1.1.1Angular Animate:
^1.5.6Angular Area:
^1.5.6Anyone else had anything like that recently?
Thanks
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.
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]
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.
They just released angular 1.6.1 which looks like it may fix the ngmodeloptions
+1
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. :(
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 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
I recommend keeping all other angular components at this version to avoid any further breakage.
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?
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.
I wrote ng-model-options issue detail at #10192 (comment). I drop it here in case it is useful for anyone else.
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 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:
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.
This issue will be address with the fixes to #10111.
+1
@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
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
.
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.
Will there be a new release soon?
Seems as if AngularJS v1.6.9 doesn't work with AngularJS Material v1.1.7 -- any one else have this issue?
@joehoeller please open a new issue and provide a CodePen that demonstrates the issue and the NPM warnings/errors that you are seeing.
Just now seeing this, the prob still persists. I'll post in a few...
Router doesnt work with Material
@joehoeller please open a new issue with a GitHub repo reproduction.
Most helpful comment
Will there be a new release soon?