Skip to content

ng serve never ends when angular.json file not found #24017

@AlonsoK28

Description

@AlonsoK28

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

ng serve compilation never ends when a file included into angular.json styles section is not found

angular-cli message ⠦ Generating browser application bundles (phase: setup)... never ends/stop

this is the missing file
image

I think angular-cli should break/stop the ng serve command? beacuse the folowing message still in a loop

image

task manager show angular-cli terminal process using 0% of cpu

image

Minimal Reproduction

create angular proyect
reference to some file no existing into angular.json styles section
run command ng serve

Exception or Error

PS D:\Documents\dev\my-project> ng s ticket-invoice-mf
⠋ Generating browser application bundles (phase: setup)...An unhandled exception occurred: ENOENT: no such file or directory, lstat 'D:\Documents\dev\my-project\node_modules\@angular\material\prebuilt-themes\red-pink.css'
See "C:\Users\user1\AppData\Local\Temp\ng-GAtRHF\angular-errors.log" for further details.

Your Environment

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


Angular CLI: 14.2.4
Node: 16.15.0
Package Manager: npm 8.5.5
OS: win32 x64

Angular: 14.2.4
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1402.4
@angular-devkit/build-angular   14.2.4
@angular-devkit/core            14.2.4
@angular-devkit/schematics      14.2.4
@angular/cdk                    14.2.3
@angular/fire                   7.4.1
@angular/flex-layout            14.0.0-beta.40
@angular/material               14.2.3
@schematics/angular             14.2.4
rxjs                            7.5.5
typescript                      4.7.3

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