-
Notifications
You must be signed in to change notification settings - Fork 68
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
Nestjs ng-universal package dependency errors #1124
Comments
Hi @Razorshnegax018 can you create a minimal reproduction in a cloneable git repository ? |
I added a stackblitz reproduction in the post, you can view it here just run Sorry for the late reply |
Hi @Razorshnegax018, I looked at the minimal reproduction that you created, but I can't reproduce the warnings messages and I can't find the |
Hey @Tony133, I forgot to save the example code and now updated it with the ng-universal package and reproduces the error I'm talking about Thanks for your help |
Is there an existing issue for this?
Current behavior
I'm trying to use nextjs with angular universal but I'm getting 3 dependency mismatch warnings, which is causing the whole nestjs application to fail. The problem is, I don't know which packages are the problem. All of the packages in my project are at the latest version and I'm using pnpm.
I'm fairly certain that these warnings are causing my application to fail, as the actual nestjs error that I get is an 'address in use' error which makes no sense. I just started up my computer how is localhost:4000 already in use?
Minimum reproduction code
Stackblitz example
Steps to reproduce
(from the above example)
Just run
npm run dev:ssr
Note: The startup command is wrong, ctrl+c after packages are done installing
(From a fresh template)
npm run dev:ssr
Expected behavior
Build the nestjs application without any errors, allowing me to visit localhost
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
@nestjs/ng-universal
NestJS version
10.2.7
Packages versions
Node.js version
18.17.0
In which operating systems have you tested?
Other
FULL ERROR LOG:
`
Build at: 2023-10-20T19:20:27.475Z - Hash: 7286de97f95b1151 - Time: 100389ms
./node_modules/.pnpm/@nestjs[email protected][email protected][email protected][email protected][email protected]/node_modules/@nestjs/common/utils/load-package.util.js:12:35-55 - Warning: Critical dependency: the request of a dependency is an expression
./node_modules/.pnpm/@nestjs+core@10.2.7_@nestjs+common@10.2.7_@nestjs[email protected][email protected][email protected]/node_modules/@nestjs/core/helpers/load-adapter.js:12:35-59 - Warning: Critical dependency: the request of a dependency is an expression
./node_modules/.pnpm/@nestjs+core@10.2.7_@nestjs+common@10.2.7_@nestjs[email protected][email protected][email protected]/node_modules/@nestjs/core/helpers/optional-require.js:9:35-55 - Warning: Critical dependency: the request of a dependency is an expression
// Problem warning end
Application bundle generation complete. [104.066 seconds]
Watch mode enabled. Watching for file changes...
Compiled successfully.
[Nest] 13803 - 10/20/2023, 2:20:31 PM LOG [NestFactory] Starting Nest application...
[Nest] 13803 - 10/20/2023, 2:20:31 PM LOG [NestFactory] Starting Nest application... +5ms
[Nest] 13803 - 10/20/2023, 2:20:31 PM LOG [InstanceLoader] AngularUniversalModule dependencies initialized +89ms
[Nest] 13803 - 10/20/2023, 2:20:31 PM LOG [InstanceLoader] AngularUniversalModule dependencies initialized +0ms
[Nest] 13803 - 10/20/2023, 2:20:31 PM LOG [InstanceLoader] AppModule dependencies initialized +0ms
[Nest] 13803 - 10/20/2023, 2:20:31 PM LOG [InstanceLoader] AppModule dependencies initialized +0ms
[Nest] 13803 - 10/20/2023, 2:20:31 PM LOG [RoutesResolver] ShipsController {/api/ships}: +51ms
[Nest] 13803 - 10/20/2023, 2:20:31 PM LOG [RouterExplorer] Mapped {/api/ships, GET} route +45ms
[Nest] 13803 - 10/20/2023, 2:20:31 PM LOG [RoutesResolver] ShipsController {/api/ships}: +2ms
[Nest] 13803 - 10/20/2023, 2:20:31 PM LOG [RouterExplorer] Mapped {/api/ships, GET} route +1ms
[Nest] 13803 - 10/20/2023, 2:20:31 PM LOG [NestApplication] Nest application successfully started +51ms
[Nest] 13803 - 10/20/2023, 2:20:31 PM LOG [NestApplication] Nest application successfully started +1ms
[Nest] 13803 - 10/20/2023, 2:20:31 PM ERROR [NestApplication] Error: listen EADDRINUSE: address already in use :::4000 +80ms
`
The text was updated successfully, but these errors were encountered: