angular / universal

Server-side rendering and Prerendering for Angular
MIT License
4.04k stars 483 forks source link

ECONNREFUSED 127.0.0.1:53233 when running "@nguniversal/builders": "^9.1.1" #1796

Closed khcd closed 4 years ago

khcd commented 4 years ago

Getting a ECONNREFUSED 127.0.0.1: when running "@nguniversal/builders": "^9.1.1". Port not in use any ideas?

command:npm run ssr:dev following example universal app

PORT_NUMBER seems to be distributed from range from 5xxx to 6xxx

🐞 Bug report

What modules are related to this issue?

@nguniversal/builders

Is this a regression?

No

Description

Compilation is fine and then when builder starts a server get notification: connect ECONNREFUSED 127.0.0.1:53233

Did a mac port scan and reveals this port is not in use.

πŸ”¬ Minimal Reproduction

npm run ssr:dev on ng 9 application

πŸ”₯ Exception or Error


connect ECONNREFUSED 127.0.0.1:53233
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! app-name@0.0.0 dev:ssr: `ng run app-name:serve-ssr`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the app-name@0.0.0 dev:ssr script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/kang.chen/.npm/_logs/2020-08-11T04_16_16_276Z-debug.log

🌍 Your Environment


Angular CLI: 9.1.12
Node: 10.16.3
OS: darwin x64

Angular: 9.1.12
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router
Ivy Workspace: Yes

Package                                    Version
--------------------------------------------------------------------
@angular-devkit/architect                  0.901.12
@angular-devkit/build-angular              0.901.12
@angular-devkit/build-optimizer            0.901.12
@angular-devkit/build-webpack              0.901.12
@angular-devkit/core                       10.0.3
@angular-devkit/schematics                 9.1.12
@angular/cdk                               9.2.4
@angular/material                          9.2.4
@ngtools/webpack                           9.1.12
@nguniversal/builders                      9.1.1
@nguniversal/common                        9.0.0
@nguniversal/express-engine                9.0.0
@nguniversal/module-map-ngfactory-loader   8.2.6
@schematics/angular                        9.1.12
@schematics/update                         0.901.12
rxjs                                       6.5.5
typescript                                 3.8.3
webpack                                    4.42.0

alan-agius4 commented 4 years ago

Hi @kang-chen, ECONNREFUSED error can the cause of a number of underlying reasons. Did you try to disable the firewall?

khcd commented 4 years ago

Hi @alan-agius4 thanks for reply, I can confirm firewall is disabled. Also VPN is disabled too.

This example repo works correctly: https://github.com/angular/universal

The mystery is that the bundle compilation step is fine, receiving the message: 'Compiled successfully.' and then 'connect` ECONNREFUSED 127.0.0.1:'

khcd commented 4 years ago

resolved as my repo was on ng 8 and producing various conflicts, have since upgraded to same version as example (ng9)

angular-automatic-lock-bot[bot] commented 4 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.