Skip to content

Since 19.1 Serve breaks on changes #29388

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

Closed
1 task done
heddendorp opened this issue Jan 17, 2025 · 1 comment
Closed
1 task done

Since 19.1 Serve breaks on changes #29388

heddendorp opened this issue Jan 17, 2025 · 1 comment

Comments

@heddendorp
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

19

Description

When I serve my app after updating to 19.1 it works initially but when changing a lazy loaded component vite is unable to find the file apparently.

Minimal Reproduction

Run yarn start and change a component

Exception or Error

6:22:20 PM [vite] Internal server error: Failed to resolve import "./chunk-MRNOOHG3.js" from ".angular/vite-root/evorto/main.js". Does the file exist?
  Plugin: vite:import-analysis
  File: C:/Users/hedde/code/evorto/.angular/vite-root/evorto/main.js:14:17
  328|      children: [
  329|        {
  330|          loadComponent: () => import("./chunk-MRNOOHG3.js").then((m) => m.TemplateCreateComponent),
     |                                      ^
  331|          path: "create"
  332|        },
      at TransformPluginContext._formatError (file:///C:/Users/hedde/code/evorto/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:47397:41)
      at TransformPluginContext.error (file:///C:/Users/hedde/code/evorto/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:47392:16)
      at normalizeUrl (file:///C:/Users/hedde/code/evorto/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:45642:23)
      at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
      at async file:///C:/Users/hedde/code/evorto/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:45761:39
      at async Promise.all (index 47)
      at async TransformPluginContext.transform (file:///C:/Users/hedde/code/evorto/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:45688:7)
      at async EnvironmentPluginContainer.transform (file:///C:/Users/hedde/code/evorto/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:47223:18)
      at async loadAndTransform (file:///C:/Users/hedde/code/evorto/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:41034:27)
      at async viteTransformMiddleware (file:///C:/Users/hedde/code/evorto/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:42478:24)

Your Environment

_                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 19.1.1
Node: 22.13.0
Package Manager: yarn 4.5.3
OS: win32 x64

Angular: 19.1.1
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router, ssr

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1901.1
@angular-devkit/build-angular     19.1.1
@angular-devkit/core              19.1.1
@angular-devkit/schematics        19.1.1
@angular/cdk                      19.1.0
@angular/material                 19.1.0
@angular/material-luxon-adapter   19.1.0
@schematics/angular               19.1.1
rxjs                              7.8.1
typescript                        5.7.3
zone.js                           0.15.0

Anything else relevant?

I'll try to come up with a repro that does not require secret env variables.
Until then, you can find the code in https://github.com/evorto-app/app
This is update to the state that causes issues for me.

Previously it seemed like the error was coming from a file in dist as I could see sentry processed instrumentation in the error message. I deleted the dist and .angular folder which did remove the mentions of sentry in the error message.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants