ng-universal
ng-universal copied to clipboard
Collection "@nestjs/ng-universal" cannot be resolved
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:
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.