Skip to content

ng serve: Builder must provide an initial full build before incremental results #29566

@jsangmeister

Description

@jsangmeister

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

v18

Description

Hi, sorry if this has been reported before, but I searched and couldn't find a similar issue.

When running ng serve with errors in the code, it will report them correctly and then output Watch mode enabled. Watching for file changes.... After fixing the errors, the code will compile correctly, but then the command stops with the error below.

Minimal Reproduction

  1. Run ng serve with errors in the code
  2. Fix errors
  3. ng serve fails

Exception or Error

An unhandled exception occurred: Builder must provide an initial full build before incremental results.

Error log:
[error] AssertionError [ERR_ASSERTION]: Builder must provide an initial full build before incremental results.
    at serveWithVite (/xxx/@angular/build/src/builders/dev-server/vite-server.js:201:43)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async execute (/xxx/@angular/build/src/builders/dev-server/builder.js:40:5)
    at async handleAsyncIterator (/xxx/@angular-devkit/architect/src/api.js:38:28)

Your Environment

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

Angular CLI: 19.1.5
Node: 20.13.1
Package Manager: npm 10.8.2
OS: linux x64

Angular: undefined
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1901.5
@angular-devkit/core         19.1.5
@angular-devkit/schematics   19.1.5
@schematics/angular          19.1.5
typescript                   5.5.4

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions