Skip to content

Build failed with deleteOutputPath: false option in config #21093

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 of 15 tasks
kostyahoriainov opened this issue Jun 9, 2021 · 2 comments
Closed
1 of 15 tasks

Build failed with deleteOutputPath: false option in config #21093

kostyahoriainov opened this issue Jun 9, 2021 · 2 comments

Comments

@kostyahoriainov
Copy link

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, the previous version in which this bug was not present was: 11.2.14

Description

Build failes, if add deleteOutputPath: false in build options.

Seems like it might happend after update to webpack 5, cuz on angular v11 (with wepback 4) everything was fine.

ng build

√ Browser application bundle generation complete.
An unhandled exception occurred: Could not find asset for file: main.bbac280f1a66c93defc1.js
See "C:\Users\admin\AppData\Local\Temp\ng-jbrLjq\angular-errors.log" for further details.

🔬 Minimal Reproduction

Create a new project via ng new, add deleteOutputPath: false param in build options, and run ng build several times. After first build everything is fine, but if to run it again with no code changes, error occurred and build failes.

🔥 Exception or Error


√ Browser application bundle generation complete.
An unhandled exception occurred: Could not find asset for file: main.bbac280f1a66c93defc1.js
See "C:\Users\admin\AppData\Local\Temp\ng-jbrLjq\angular-errors.log" for further details.

image

🌍 Your Environment



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

Angular CLI: 12.0.3
Node: 14.17.0
Package Manager: npm 6.14.13
OS: win32 x64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1200.3
@angular-devkit/build-angular   12.0.3
@angular-devkit/core            12.0.3
@angular-devkit/schematics      12.0.3
@schematics/angular             12.0.3
rxjs                            6.6.7
typescript                      4.2.4

Anything else relevant?

@alan-agius4
Copy link
Collaborator

Duplicate of #21038

@alan-agius4 alan-agius4 marked this as a duplicate of #21038 Jun 9, 2021
@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 Jul 10, 2021
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