ngcc - recover from being stopped mid-build
See original GitHub issueπ bug report
Affected Package
The issue is caused by package @angular/compilerIs this a regression?
Yes, the previous version in which this bug was not present was: 9.0.2Description
It was working fine in 9.0.2. Can someone explain me this error ?
π¬ Minimal Reproduction
https://stackblitz.com/...π₯ Exception or Error
Compiling @ng-bootstrap/ng-bootstrap : module as esm5
Error: Tried to write D:/test/student/node_modules/@ng-bootstrap/ng-bootstrap/accordion/accordion-config.d.ts.__ivy_ngcc_bak with an ngcc back up file but it already exists so not writing, nor backing up, D:/test/student/node_modules/@ng-bootstrap/ng-bootstrap/accordion/accordion-config.d.ts.
This error may be because two or more entry-points overlap and ngcc has been asked to process some files more than once.
You should check other entry-points in this package and set up a config to ignore any that you are not using.
Error: Tried to write D:/test/student/node_modules/@ng-bootstrap/ng-bootstrap/accordion/accordion.d.ts.__ivy_ngcc_bak with an ngcc back up file but it already exists so not writing, nor backing up, D:/test/student/node_modules/@ng-bootstrap/ng-bootstrap/accordion/accordion.d.ts.
This error may be because two or more entry-points overlap and ngcc has been asked to process some files more than once.
You should check other entry-points in this package and set up a config to ignore any that you are not using.
Error: Tried to write D:/test/student/node_modules/@ng-bootstrap/ng-bootstrap/accordion/accordion.module.d.ts.__ivy_ngcc_bak with an ngcc back up file but it already exists so not writing, nor backing up, D:/test/student/node_modules/@ng-bootstrap/ng-bootstrap/accordion/accordion.module.d.ts.
This error may be because two or more entry-points overlap and ngcc has been asked to process some files more than once.
You should check other entry-points in this package and set up a config to ignore any that you are not using.
Error: Tried to write D:/test/student/node_modules/@ng-bootstrap/ng-bootstrap/alert/alert-config.d.ts.__ivy_ngcc_bak with an ngcc back up file but it already exists so not writing, nor backing up, D:/test/student/node_modules/@ng-bootstrap/ng-bootstrap/alert/alert-config.d.ts.
This error may be because two or more entry-points overlap and ngcc has been asked to process some files more than once.
You should check other entry-points in this package and set up a config to ignore any that you are not using.
Error: Tried to write D:/test/student/node_modules/@ng-bootstrap/ng-bootstrap/alert/alert.d.ts.__ivy_ngcc_bak with an ngcc back up file but it already exists so not writing, nor backing up, D:/test/student/node_modules/@ng-bootstrap/ng-bootstrap/alert/alert.d.ts.
π Your Environment
Angular Version:
ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ β³ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 9.1.0
Node: 10.16.3
OS: win32 x64
Angular: 9.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.901.0
@angular-devkit/build-angular 0.901.0
@angular-devkit/build-optimizer 0.901.0
@angular-devkit/build-webpack 0.901.0
@angular-devkit/core 9.1.0
@angular-devkit/schematics 9.1.0
@ngtools/webpack 9.1.0
@schematics/angular 9.1.0
@schematics/update 0.901.0
rxjs 6.5.4
typescript 3.8.3
webpack 4.42.0
Anything else relevant?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Angular 9 - NGCC fails with an unhandled exception
In my particular case, the @angular-devkit/build-angular was updated to "^0.1001.2" in my package.json file after running the npm audit fix.
Read more >LANDBANK, NGCC in talks to finance gov't offices in New ...
Borromeo to seek the state-run Bank's support in financing the MTD Group's upcoming projects, which include the New Modernization Building ...
Read more >NGCC VoicePath API-II BT Reference Guide
The VP-API-II library is a C source code module that provides a standard software interface for controlling, testing, and passing digitized voice through...
Read more >Next Generation Core Competencies - FEMA Training
During the 2015 FEMA Higher Education Symposium, interest was expressed for a ... Emergency Management Competencies that Build the Practitioner includesΒ ...
Read more >Next Generation Critical Communications (NGCC)
Financially and commercially sensitive information has been removed. The full Detailed Business Case (DBC) with appropriate redactions mayΒ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Glad you got it working.
Generally, ngcc is able to resume when interrupted, unless it happens to be interrupted after starting writing files for a specific entry-point (and before completing writing them). This is a relatively small part of the whole ngcc processing, so the chances of this happening are small.
Unfortunetely, it is currently not possible to safely recover when interrupted during file writing. Maybe we could improve the error message to explain that it might be a result of a previous instance exiting unexpectedly (e.g. being stopped by the user before completing). We could even add a marker in the exntry-pointβs
package.json
when starting processing it, so it is easier to detect this situation.We donβt have enough capacity to implement a solution to make ngcc resilient to being killed in this way right now. Instead we will update the error message to indicate that this error might be caused by killing ngcc and may be resolved by removing and reinstalling the node_modules.