Skip to content
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

Angular 19.1.3 SSR Vite Crash on every reload HMR disabled #29443

Open
1 task done
us77ipis opened this issue Jan 22, 2025 · 2 comments
Open
1 task done

Angular 19.1.3 SSR Vite Crash on every reload HMR disabled #29443

us77ipis opened this issue Jan 22, 2025 · 2 comments
Labels
needs: repro steps We cannot reproduce the issue with the information given

Comments

@us77ipis
Copy link

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

After updating from 19.0.x to 19.1.3 even with HMR disabled ng serve crashes any time I update any file.

Looks similar to #29424, but happens also with HMR disabled.

Minimal Reproduction

Run ng serve --no-hmr

Exception or Error

[vite] (ssr) Error when evaluating SSR module /main.server.mjs:
|- Error: [vite] cannot find entry point module '/main.server.mjs'.
    at fetchModule (file:///app/frontend/node_modules/@angular/build/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:51477:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async handleInvoke (file:///app/frontend/node_modules/@angular/build/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:44166:22)
    at async EventEmitter.listenerForInvokeHandler (file:///app/frontend/node_modules/@angular/build/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:44239:19)

An unhandled exception occurred: [vite] cannot find entry point module '/main.server.mjs'.

Your Environment

Angular CLI: 19.1.3
Node: 22.12.0
Package Manager: npm 10.9.0
OS: linux x64

Angular: 19.1.2
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1901.3
@angular-devkit/build-angular   19.1.3
@angular-devkit/core            19.1.3
@angular-devkit/schematics      19.1.3
@angular/cdk                    19.1.0
@angular/cli                    19.1.3
@angular/material               19.1.0
@angular/ssr                    19.1.3
@schematics/angular             19.1.3
rxjs                            7.8.1
typescript                      5.6.3
zone.js                         0.15.0

Anything else relevant?

No response

@alan-agius4
Copy link
Collaborator

This seems like a bug but we'll need to look at a reproduction to find and fix the problem. Can you setup a minimal repro please?

You can read here why this is needed. A good way to make a minimal repro is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.

This might be related to your directory structure so its really important to get an accurate repro to diagnose this.

@alan-agius4 alan-agius4 added the needs: repro steps We cannot reproduce the issue with the information given label Jan 22, 2025
@us77ipis
Copy link
Author

I'll continue trying to create a minimal example, though I have not achieved reproduction of the issue starting with a fresh project so far.

Here the ng version output from before the update that caused the issue, in case that helps:

Angular CLI: 19.0.4
Node: 22.12.0
Package Manager: npm 10.9.0
OS: linux x64

Angular: 19.0.3
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1900.4
@angular-devkit/build-angular   19.0.4
@angular-devkit/core            19.0.4
@angular-devkit/schematics      19.0.4
@angular/cdk                    19.0.4
@angular/cli                    19.0.4
@angular/material               19.0.4
@angular/ssr                    19.0.4
@schematics/angular             19.0.4
rxjs                            7.8.1
typescript                      5.6.3
zone.js                         0.15.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: repro steps We cannot reproduce the issue with the information given
Projects
None yet
Development

No branches or pull requests

2 participants