Closed e-oz closed 1 month ago
Transferring this ticket to the CLI repo for further investigation, this might be related to some recent changes there. cc @alan-agius4
This is an nx config but the relevant part is
"server": "src/main.server.ts",
"prerender": false,
"ssr": false
This worked before but now it throws.
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.
Which @angular/* package(s) are the source of the bug?
compiler-cli
Is this a regression?
Yes
Description
I apologize for the bug report without a reproduction link. It is posted in the hope that you might get some clues about what could be wrong just by reading the error and config.
With this config:
ng serve
throws an error, andng serve --configuration=dev-ssr
works finePlease provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
NOTE: Raw file sizes do not reflect development server per-request transformations. ➜ Local: http://localhost:4200/ ➜ press h + enter to show help 5:48:55 PM [vite] Internal server error: Failed to load url /main.server.mjs (resolved id: /main.server.mjs). Does the file exist? at loadAndTransform (file:///Users/oz/repos/project-name/repo-name/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:51858:17) at async instantiateModule (file:///Users/oz/repos/project-name/repo-name/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:52817:44) 5:48:55 PM [vite] Internal server error: Failed to load url /main.server.mjs (resolved id: /main.server.mjs). Does the file exist? at loadAndTransform (file:///Users/oz/repos/project-name/repo-name/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:51858:17) at async instantiateModule (file:///Users/oz/repos/project-name/repo-name/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:52817:44) (x2) 5:49:00 PM [vite] Internal server error: Failed to load url /main.server.mjs (resolved id: /main.server.mjs). Does the file exist? at loadAndTransform (file:///Users/oz/repos/project-name/repo-name/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:51858:17) at async instantiateModule (file:///Users/oz/repos/project-name/repo-name/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:52817:44) (x3) 5:49:01 PM [vite] Internal server error: Failed to load url /main.server.mjs (resolved id: /main.server.mjs). Does the file exist? at loadAndTransform (file:///Users/oz/repos/project-name/repo-name/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:51858:17) at async instantiateModule (file:///Users/oz/repos/project-name/repo-name/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:52817:44) (x4)
Please provide the environment you discovered this bug in (run
ng version
)Angular CLI: 19.0.0-next.9 Node: 22.9.0 Package Manager: npm 10.8.3 OS: darwin arm64
Angular: 19.0.0-next.8 ... animations, common, compiler, compiler-cli, core, forms ... language-service, localize, platform-browser ... platform-browser-dynamic, platform-server, router ... service-worker
Package Version
@angular-devkit/architect 0.1900.0-next.9 @angular-devkit/build-angular 19.0.0-next.9 @angular-devkit/core 19.0.0-next.9 @angular-devkit/schematics 19.0.0-next.9 @angular/cdk 19.0.0-next.6 @angular/cli 19.0.0-next.9 @angular/material 19.0.0-next.6 @angular/pwa 19.0.0-next.9 @angular/ssr 19.0.0-next.9 @schematics/angular 19.0.0-next.9 rxjs 7.8.1 typescript 5.6.2 zone.js 0.15.0
Anything else?
No response