-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed as not planned
Closed as not planned
Copy link
Description
Command
build
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
16
Description
Issue:
If you do the ESbuild migration from browser build to application build you get an error while running "ng build" saying it cannot read index HTML file. In special setups that don't yet have this index.html, this was ok since you could leave that configuration empty and it would build. How this worked is you would manually add your build files paths to your project and the app's final dynamic html file would have them as srcs to download like usual. Now, whether the "index" config is empty or removed it fails to build.
Minimal Reproduction
Repro:
- Start with existing v16 project.
- Builder should be this:
"builder": "@angular-devkit/build-angular:browser"
- To emulate a semi-custom build, the angular.json should have
"index": "",
- Builder should be this:
- Migrate the core to v17
- Migrate builder from browser to application
- Follow instructions here: https://angular.io/guide/esbuild#using-the-application-builder
- Builder should looks like this now: "builder": "@angular-devkit/build-angular:application",
- Run
ng build
Actual:
- An unhandled exception occurred: Failed to read index HTML file "project/src".
Expected:
- Should build without errors since it was able to do so previously while not having an index.html file.
Exception or Error
An unhandled exception occurred: Failed to read index HTML file "project/src".
Your Environment
Angular CLI: 17.1.0
Node: 18.17.0
Package Manager: npm 9.6.7
OS: darwin x64
Angular: 17.1.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, material, platform-browser
... platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1701.0
@angular-devkit/build-angular 17.1.0
@angular-devkit/core 17.1.0
@angular-devkit/schematics 17.1.0
@schematics/angular 17.1.0
rxjs 7.8.1
typescript 5.3.3
zone.js 0.14.3
Anything else relevant?
No response
Metadata
Metadata
Assignees
Labels
No labels