Skip to content

FatalDiagnosticError is being thrown by the compiler when removing signal input or Child component is not exported #27045

@JeanMeche

Description

@JeanMeche

Command

build, 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

17.1

Description

The CLI throws the following error when running the provided repro.

[✘ [ERROR] Cannot read properties of null (reading 'errors') [plugin angular-compiler]

    node_modules/@angular-devkit/build-angular/src/tools/esbuild/angular/compiler-plugin.js:199:32:
      199 │                 if (diagnostics.errors?.length) {
          ╵                                 ^

    at /Users/kyro/Developer/web/angular-projects/next/node_modules/@angular-devkit/build-angular/src/tools/esbuild/angular/compiler-plugin.js:199:33
    at async /Users/kyro/Developer/web/angular-projects/next/node_modules/esbuild/lib/main.js:1350:22
    at async Promise.all (index 0)
    at async requestCallbacks.on-start (/Users/kyro/Developer/web/angular-projects/next/node_modules/esbuild/lib/main.js:1348:5)
    at async handleRequest (/Users/kyro/Developer/web/angular-projects/next/node_modules/esbuild/lib/main.js:732:11)

  This error came from the "onStart" callback registered here:

    node_modules/@angular-devkit/build-angular/src/tools/esbuild/angular/compiler-plugin.js:81:18:
      81 │             build.onStart(async () => {
         ╵                   ~~~~~~~

    at setup (/Users/kyro/Developer/web/angular-projects/next/node_modules/@angular-devkit/build-angular/src/tools/esbuild/angular/compiler-plugin.js:81:19)
    at async handlePlugins 

Minimal Reproduction

Repro : https://github.com/jeanmeche/next

The issue doesn't not happen when either

  • The Child component is exported
  • Signal input is removed.

While there is maybe an issue on the signal implementation part, the CLI probably shouldn't throw the way it does.

Your Environment

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

Angular CLI: 17.1.2
Node: 18.17.0
Package Manager: npm 9.6.7
OS: darwin x64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1701.2
@angular-devkit/build-angular   17.1.2
@angular-devkit/core            17.1.2
@angular-devkit/schematics      17.1.2
@schematics/angular             17.1.2
rxjs                            7.8.1
typescript                      5.3.3
zone.js                         0.14.3

Metadata

Metadata

Assignees

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