🐞 Bug report
Command (mark with an x)
Is this a regression?
I don't know if this worked in previous versions
Description
When running ng serve on a workspace project with libraries and I use ng build <lib-name> --prod --watch to constantly build the library on changes, after the second change in the same library file, I get the following error:
ERROR in Tried to overwrite ....d.ts.__ivy_ngcc_bak with an ngcc back up file, which is disallowed.
🔬 Minimal Reproduction
- Create angular workspace project
- Create new library inside the project
- Use the library in the project
- Start library build with
--watch
- Run
ng serve
- Change something inside a library file and save -> server detects the change in dist folder and recompiles
- Change something in the same library file -> server detects the change in dist folder and recompiles -> ERROR
🔥 Exception or Error
After first change:
Date: 2020-12-16T08:54:11.584Z - Hash: 5d74c1474915b4072a91
13 unchanged chunks
Time: 1872ms
: Compiled successfully.
Date: 2020-12-16T08:54:14.572Z - Hash: 5d74c1474915b4072a91
13 unchanged chunks
Time: 2657ms
: Compiled successfully.
After second change:
Compiling @apmatic/apm-ui-core : es2015 as esm2015
Date: 2020-12-16T08:55:23.790Z - Hash: b8f3181cb1e82c5839c5
13 unchanged chunks
Time: 3367ms
ERROR in Tried to overwrite dist/....service.d.ts.__ivy_ngcc_bak with an ngcc back up file, which is disallowed.
0% compiling
Compiling @apmatic/apm-ui-core : es2015 as esm2015
Date: 2020-12-16T08:55:28.463Z - Hash: b8f3181cb1e82c5839c5
13 unchanged chunks
Time: 4270ms
ERROR in Tried to overwrite dist/....service.d.ts.__ivy_ngcc_bak with an ngcc back up file, which is disallowed.
0% compiling
This leads in an endless loop of building.
🌍 Your Environment
Angular CLI: 9.1.3
Node: 12.19.0
OS: linux x64
Angular: 9.1.3
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router, service-worker
Ivy Workspace: Yes
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.900.7
@angular-devkit/build-angular 0.900.7
@angular-devkit/build-ng-packagr 0.900.7
@angular-devkit/build-optimizer 0.900.7
@angular-devkit/build-webpack 0.900.7
@angular-devkit/core 9.0.7
@angular-devkit/schematics 9.1.3
@angular/cdk 9.2.1
@angular/flex-layout 9.0.0-beta.31
@angular/material 9.2.1
@angular/material-moment-adapter 9.2.1
@ngtools/webpack 9.0.7
@schematics/angular 9.1.3
@schematics/update 0.901.3
ng-packagr 9.1.1
rxjs 6.5.5
typescript 3.7.5
webpack 4.41.2
Anything else relevant?
The same happens on Windows as well. Also I found an article in an other issue describing the same behavior:
error when compiling with ivy ngcc (Teradata/covalent)
🐞 Bug report
Command (mark with an
x)Is this a regression?
I don't know if this worked in previous versions
Description
When running
ng serveon a workspace project with libraries and I useng build <lib-name> --prod --watchto constantly build the library on changes, after the second change in the same library file, I get the following error:ERROR in Tried to overwrite ....d.ts.__ivy_ngcc_bak with an ngcc back up file, which is disallowed.🔬 Minimal Reproduction
--watchng serve🔥 Exception or Error
After first change:
After second change:
This leads in an endless loop of building.
🌍 Your Environment
Anything else relevant?
The same happens on Windows as well. Also I found an article in an other issue describing the same behavior:
error when compiling with ivy ngcc (Teradata/covalent)