This repository was archived by the owner on Nov 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 479
This repository was archived by the owner on Nov 22, 2024. It is now read-only.
🐞 ERROR NetworkError with the proxy + ssr-dev-server #3009
Copy link
Copy link
Closed
Description
🐞 Bug report
What modules are related to this issue?
- builders (
ssr-dev-server) - common
- express-engine
Is this a regression?
No idea.
Description
When using the proxy (proxy.conf.js + "proxyConfig": "proxy.conf.js") with @nguniversal/builders:ssr-dev-server, it seems that the proxy doesn't occure when rendering from the server.
Works fine on Client Side Rendering.
I'd like to test the SSR (checking if page are fine, etc) without a local reverse proxy using the proxy middleware that should be available with ssr-dev-server.
I'm not sure it is related to angular/angular#51626 as it should use the proxy.
Edit: I've tested to set this.config.useAbsoluteUrl = true; as said in the issue, but I'm facing ERROR Error: "PlatformConfig.baseUrl" must be set if "useAbsoluteUrl" is true
🔬 Minimal Reproduction
- Clone this repo: https://github.com/Yberion/Angular-SSR-Common-Engine
npm inpm run start:ssr:fastify:developmentornpm run start:ssr:express:development
🔥 Exception or Error
ERROR NetworkError
at XMLHttpRequest.send (D:\GitHub\Angular-SSR-Common-Engine\dist\Angular-SSR-Common-Engine\server\fastify\main.js:102272:19)
at Observable._subscribe (D:\GitHub\Angular-SSR-Common-Engine\dist\Angular-SSR-Common-Engine\server\fastify\main.js:131916:11)
at Observable._trySubscribe (D:\GitHub\Angular-SSR-Common-Engine\dist\Angular-SSR-Common-Engine\server\fastify\main.js:81340:19)
at D:\GitHub\Angular-SSR-Common-Engine\dist\Angular-SSR-Common-Engine\server\fastify\main.js:81334:115
at Object.errorContext (D:\GitHub\Angular-SSR-Common-Engine\dist\Angular-SSR-Common-Engine\server\fastify\main.js:91215:5)
at Observable.subscribe (D:\GitHub\Angular-SSR-Common-Engine\dist\Angular-SSR-Common-Engine\server\fastify\main.js:81330:20)
at scheduleTask (D:\GitHub\Angular-SSR-Common-Engine\dist\Angular-SSR-Common-Engine\server\fastify\main.js:186131:24)
at Observable._subscribe (D:\GitHub\Angular-SSR-Common-Engine\dist\Angular-SSR-Common-Engine\server\fastify\main.js:186168:7)
at Observable._trySubscribe (D:\GitHub\Angular-SSR-Common-Engine\dist\Angular-SSR-Common-Engine\server\fastify\main.js:81340:19)
at D:\GitHub\Angular-SSR-Common-Engine\dist\Angular-SSR-Common-Engine\server\fastify\main.js:81334:115
🌍 Your Environment
(Also having the problem with Angular 14)
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 15.1.4
Node: 18.13.0
Package Manager: npm 9.2.0
OS: win32 x64
Angular: 15.1.2
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1501.4
@angular-devkit/build-angular 15.1.4
@angular-devkit/core 15.1.4
@angular-devkit/schematics 15.1.4
@angular/cli 15.1.4
@nguniversal/builders 15.1.0
@nguniversal/common 15.1.0
@schematics/angular 15.1.4
rxjs 7.8.0
typescript 4.9.5
Metadata
Metadata
Assignees
Labels
No labels