apollo-angular: Dependency error on Angular 13
On an Angular 13 project running
ng add apollo-angular
results in this…
npm ERR! Could not resolve dependency: npm ERR! peer @angular/core@“^6.1.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0” from apollo-angular@2.6.0
To Reproduce
Steps to reproduce the behavior:
Run from terminal
ng add apollo-angular
Expected behavior
Well, I was hoping for this to work 😃
Environment:
├── @angular/cli@13.0.1
├── @angular/core@13.0.0
└── typescript@4.4.4
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 44
- Comments: 19 (4 by maintainers)
Guys we are still waiting for this. Any update on your plans please??
@kamilkisiela thanks for you amazing work with this lib. Is there anything we can do to help on releasing apollo-angular v3 as stable version? Is there any stopper we can help with?
@kamilkisiela are you planning a release soon?
3.0.0-alpha.2is working fine for me except for one typing mismatch with a newer graphql version (16.x):I also had to add
Apolloitself as aprovidersitem (in addition to theAPOLLO_OPTIONS) to my module. Would be great to see the 3.x release going stable as its currently the only version providing real support for Angular 13x and @apollo/client@3.xEdit: I’m not using ApolloModule (deprecated/removed already in v2.x)
3.0.0-alpha.23.0.0-alpha.2My dependencies
"dependencies": { "@angular/animations": "~13.0.0", "@angular/cdk": "13.0.3", "@angular/common": "~13.0.0", "@angular/compiler": "~13.0.0", "@angular/core": "~13.0.0", "@angular/forms": "~13.0.0", "@angular/material": "13.0.3", "@angular/platform-browser": "~13.0.0", "@angular/platform-browser-dynamic": "~13.0.0", "@angular/router": "~13.0.0", "@apollo/client": "^3.5.6", "apollo-angular": "3.0.0-alpha.2", "graphql": "^16.1.0", "rxjs": "~7.4.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" }I was able to make it work after importing the apollo module on my app module:
Hey, great that this got fixed! This issue is tagged with “alpha-release-testing” - is there an alpha release of the npm package we could test?
I can’t speak for everyone else, but upgrading apollo-angular to “^3.0.0-alpha.2” resolved the issue for me.
@heberlopezz that’s caused by an incompatibility with GraphQL 16. There’s an open issue for that too: https://github.com/kamilkisiela/apollo-angular/issues/1723
#1729