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

Collection "@nestjs/ng-universal" cannot be resolved #941

Open
natejgardner opened this issue Nov 27, 2022 · 1 comment
Open

Collection "@nestjs/ng-universal" cannot be resolved #941

natejgardner opened this issue Nov 27, 2022 · 1 comment

Comments

@natejgardner
Copy link

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

ng add @nestjs/ng-universal fails with Collection "@nestjs/ng-universal" cannot be resolved.

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?

Using the framework

Environment


Nest version: 9.1.5
Angular version: 15.0.1

 
For Tooling issues:
- Node version: 18.12.1  
- Platform:  Linux 

Others:

@natejgardner
Copy link
Author

Could you document which version of Nest + Angular should be used with each release?

By default, with Angular 16, ng add @nestjs/ng-universal now installs Nest 10, which doesn't work out of the box:

ng new webapp
cd webapp
ng add @nestjs/ng-universal
npm run build:ssr; npm run serve:ssr

Results in:

[constants_1.METHOD_METADATA]: request_method_enum_1.RequestMethod.GET
                                                                     ^
TypeError: Cannot read properties of undefined (reading 'GET')

Manually reverting NestJS in package.json to 9.x fixes the issue.

The pace of release is awesome (just barely migrated to Nest 9 and Nest 10 is already out)- ideally ng-universal will target the specific compatible version of Nest that's been verified to work with the corresponding version of Angular out of the box. There doesn't seem to be a way to directly select Nest 9.x when running ng add @nestjs/ng-universal since version 8, which used to install Nest 9, now installs Nest 10.

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

1 participant