Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schematics: ng-add wants to install 14.x in Angular 15.x project #3691

Closed
2 tasks
fmalcher opened this issue Dec 1, 2022 · 3 comments · Fixed by #3692
Closed
2 tasks

schematics: ng-add wants to install 14.x in Angular 15.x project #3691

fmalcher opened this issue Dec 1, 2022 · 3 comments · Fixed by #3692

Comments

@fmalcher
Copy link
Contributor

fmalcher commented Dec 1, 2022

Which @ngrx/* package(s) are the source of the bug?

schematics

Minimal reproduction of the bug/regression with instructions

When adding @ngrx/schematics in an Angular 15 project, it will install @ngrx/schematics@14.3.2, even though 15.0.0 is available. Looks like a peerDeps issue.

Minimal reproduction of the bug/regression with instructions

Create a new NG15 project and add @ngrx/schematics:

ng new testproject --routing --style=css
cd testproject
ng add @ngrx/schematics --default-collection

It will install 14.3.2 by default:

ℹ Using package manager: npm
✔ Found compatible package version: @ngrx/schematics@14.3.2.
✔ Package information loaded.

The package @ngrx/schematics@14.3.2 will be installed and executed.

Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)

Angular CLI: 15.0.2
Node: 18.12.1
Package Manager: npm 8.15.1
OS: darwin arm64

Angular: 15.0.2
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1500.2
@angular-devkit/build-angular   15.0.2
@angular-devkit/core            15.0.2
@angular-devkit/schematics      15.0.2
@schematics/angular             15.0.2
rxjs                            7.5.7
typescript                      4.8.4

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@brandonroberts
Copy link
Member

Interesting. The schematics package.json doesn't have any peer deps, so maybe it's Nx modifying it during the build.

@brandonroberts
Copy link
Member

Looks like that's the case

https://unpkg.com/@ngrx/schematics@15.0.0/package.json

We'll have to update the schematics project config to not update the dependencies.

@brandonroberts
Copy link
Member

@Coly010 @leosvelperez this seems like an upstream bug as it shouldn't have picked up any v14 packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants