angular 4 compatibility
See original GitHub issueBug description:
See how to reproduce below. The issue is that currently the generated package.json has:
"peerDependencies": {
"@angular/common": "^2.0.0",
"@angular/compiler": "^2.0.0",
"@angular/core": "^2.0.0",
"@angular/forms": "^2.0.0"
},
which is too restrictive - according to the official docs :
One piece of advice: peer dependency requirements, unlike those for regular dependencies, should be lenient
Note: this is a follow-up to https://github.com/ng-bootstrap/ng-bootstrap/pull/1390 which is indeed wrong - I didn’t know the package.json was autogenerated and changed the actual dependencies (because I was looking at using the fork directly as a dependency of my project), but the issue remains.
Note2: by using "^2.0.0 || >=4.0.0-beta <5.0.0",
you would still be supporting 2.x.
How to reproduce the issue:
npm install -g @angular/cli
ng new ngcli-ng4 --ng4
cd ngcli-ng4
npm install --save ng-bootstrap
output
ngcli-ng4@0.0.0 /ything/projects/tmk/tmp/ngcli-ng4
├── UNMET PEER DEPENDENCY @angular/common@4.0.0-rc.5
├── UNMET PEER DEPENDENCY @angular/compiler@4.0.0-rc.5
├── UNMET PEER DEPENDENCY @angular/core@4.0.0-rc.5
├── UNMET PEER DEPENDENCY @angular/forms@4.0.0-rc.5
├─┬ ng-bootstrap@1.1.16-1
│ └── moment@2.15.1
└── UNMET PEER DEPENDENCY zone.js@0.7.8
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN @angular/core@4.0.0-rc.5 requires a peer of zone.js@^0.8.4 but none was installed.
npm WARN ng-bootstrap@1.1.16-1 requires a peer of @angular/common@^2.0.0 but none was installed.
npm WARN ng-bootstrap@1.1.16-1 requires a peer of @angular/compiler@^2.0.0 but none was installed.
npm WARN ng-bootstrap@1.1.16-1 requires a peer of @angular/core@^2.0.0 but none was installed.
npm WARN ng-bootstrap@1.1.16-1 requires a peer of @angular/forms@^2.0.0 but none was installed.
Versions
- npm 3.10.10
- Angular: 4.0.0-rc.5
- ng-bootstrap: 1.1.16
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Browser support - Angular
Angular is built on the latest standards of the web platform. Targeting such a wide range of browsers is challenging because they do...
Read more >Angular 4 compatibility with @angular/material - Stack Overflow
You are installing the latest version of @angular/cdk and @angular/material (version 6.x.x), the major versions of those packages should ...
Read more >Defining Angular 4 and How to Master It - Simplilearn
1. Typescript 2.1+ compatibility. Angular 4 supports the most recent versions of TypeScript, i.e. 2.1 and 2.2. · 2. HTTP · 3. Improved...
Read more >Angular 4 - Project Setup - Tutorialspoint
Angular4 uses TypeScript 2.2 version whereas Angular 2 uses TypeScript version 1.8.
Read more >Angular 4 compatibility? · Issue #1644 · PatrickJS/angular-starter
Angular 4 is out this week mainly your project need to update dependencies; imports usage; ng-template..
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK, seems like all the issues on the Angular side are fixed in the 4.0.0 final, I got ng-bootstrap working perfectly fine with 2.3.1+ and 4.0.0 locally (both JIT and AOT). Cutting a release that will relax peer dependencies range right now.
Yep, we should relax this range. Will do it in the upcoming release.