question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular Universal dev:ssr doesn't work after upgrade to v12.3.5

See original GitHub issue

Current Behavior

showing error like

E:\repo\oss\nx-angular-universal\dist\my-app\server\main.js:159518
                        throw error;
                        ^

Error: listen EADDRINUSE: address already in use :::26745
    at Server.setupListenHandle [as _listen2] (net.js:1318:16)
    at listenInCluster (net.js:1366:12)
    at Server.listen (net.js:1452:7)
    at Function.listen (E:\repo\oss\nx-angular-universal\dist\my-app\server\main.js:126804:24)
    at run (E:\repo\oss\nx-angular-universal\dist\my-app\server\main.js:162510:12)
    at E:\repo\oss\nx-angular-universal\dist\my-app\server\main.js:162517:5
    at E:\repo\oss\nx-angular-universal\dist\my-app\server\main.js:162521:3
    at Object.<anonymous> (E:\repo\oss\nx-angular-universal\dist\my-app\server\main.js:162526:12)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
Emitted 'error' event on Server instance at:
    at emitErrorNT (net.js:1345:8)
    at ZoneDelegate.invokeTask (E:\repo\oss\nx-angular-universal\dist\my-app\server\main.js:159742:31)
    at Zone.runTask (E:\repo\oss\nx-angular-universal\dist\my-app\server\main.js:159514:47)
    at invokeTask (E:\repo\oss\nx-angular-universal\dist\my-app\server\main.js:159823:34)
    at ZoneTask.invoke (E:\repo\oss\nx-angular-universal\dist\my-app\server\main.js:159812:48)
    at data.args.<computed> (E:\repo\oss\nx-angular-universal\dist\my-app\server\main.js:160283:25)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  code: 'EADDRINUSE',
  errno: -4091,
  syscall: 'listen',
  address: '::',
  port: 26745
}

A server error has occurred.
node exited with 1 code.

Steps to Reproduce

demo repo : https://github.com/maxisam/nx-ng-ssr-12

If you revert it back to 11. (7f8d5ab17448a015ecfd4249f9f52a744d3fd871) it works.

Environment

node 14.16.1 windows: 10

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
adeprezcommented, Dec 15, 2021

@maxisam I am facing the same issue. Do you have any workaround? Or were you able to find a couple of versions working well together? (12 <= ng < 13)

If you created an issue in a Angular repo, can you paste a link to it?

1reaction
maxisamcommented, Jun 29, 2021

Well, I am on Node 14.17.1 / Win10 x64 / yarn 1.22.5 with fresh yarn install. I use the nx-12.3.5 branch and update nguniversal to 12. (I just update the repo) And I still see the same error. image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server-side rendering (SSR) with Angular Universal
Use this command when you want to build the project for deployment. Starts the server script for serving the application locally with server-side...
Read more >
reinstall angular universal after angular cli upgrade
To reinstall the angular universal using ng add. You will need to remove all the files was generated by it. Such as. src/main.server.ts ......
Read more >
Angular Universal: Complete Practical Guide
This post will be a complete practical guide for getting started with Angular Universal. We are going to go start with an existing...
Read more >
How To Use Angular Universal for Server Side Rendering
Step 2 — Starting Your Universal App ... From a command line, run the following command: npm run build:ssr ... And then run:...
Read more >
Angular Universal: real app problems - InDepth.Dev
How Angular Universal Works ... For rendering on the server, Angular uses the DOM implementation for node.js — domino. For each GET request,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found