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

Angular 15 ng add dependency issue 'Packages installation failed' #942

Closed
a7medpa opened this issue Dec 7, 2022 · 6 comments
Closed

Angular 15 ng add dependency issue 'Packages installation failed' #942

a7medpa opened this issue Dec 7, 2022 · 6 comments

Comments

@a7medpa
Copy link

a7medpa commented Dec 7, 2022

I'm submitting a...


[ ] Regression 
[X] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: webapp@0.0.0
npm ERR! Found: @angular/common@15.0.2
npm ERR! @angular/common@"^15.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^12.0.0 || ^13.0.0 || ^14.0.0" from @nestjs/ng-universal@6.1.0
npm ERR! node_modules/@nestjs/ng-universal
npm ERR! @nestjs/ng-universal@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

ng add @nestjs/ng-universal fails with ✖ Packages installation failed, see above.

Expected behavior

NestJS is added to Angular 15 project.

Minimal reproduction of the problem with instructions

ng new webapp
cd webapp
ng add @nestjs/ng-universal

What is the motivation / use case for changing the behavior?

Use the framework

Environment


Nest version: * (latest) and 6.0.1  (`ng add @nestjs/ng-universal` automatically picks 6.0.1 version for me)

 
For Tooling issues:
- Node version: 16.17.1 and 18.10.0  
- Platform: Windows  

Others:

@abelfubu
Copy link

Same problem here

@kylerummens
Copy link

Any workaround for the time being?

@F4pl0
Copy link

F4pl0 commented Dec 22, 2022

Had the same issue, did some investigation and after few hours seems like there is no support for Angular 15 which makes me quite sad considering Angular 15 has been out for some time now. Only workaround to this issue is to use latest Angular 14 deps and it will work with latest version of @nest/ng-universal... Update the version, please!

@mansern
Copy link

mansern commented Jan 29, 2023

Hey folks, till the time the PR from bartlomiejgawel is not merged, you can use this NPM package: https://www.npmjs.com/package/ng-universal-15

This package supports Angular 15.

PS. I used the PR of bartlomiejgawel and published my own package as a quick fix ;)

@F4pl0
Copy link

F4pl0 commented Jan 30, 2023

I think this has been fixed in 0.8.0, I've also created a PR with this fix, and one other (bug crashed Angular development building process because of incorrect cache path) that has been done in said version, though PR hasn't been merged. Angular has been updated to 15 (from 14), but in some cases you may have to use the --force parameter to get around the possible minor version of Angular mismatch. It works for me in a NX workspace with Nest.js and Angular. I think there was no need for a temporary fork-y workaround, but also had same idea to make well-maintained version of this lib pre-0.8.0.

@kamilmysliwiec
Copy link
Member

Let's track this here #943

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

No branches or pull requests

6 participants