ivy-ngcc (8.0.0-beta.11): ng2-dragula.js.__ivy_ngcc_bak with an ngcc back up file, which is disallowed
See original GitHub issueπ bug report
Affected Package
The issue is caused by package @angular/compiler-cli (ivy-ngcc)Description
npx ivy-ngcc -l debug
execution ends up with the following output:
Compiling @angular/core : fesm2015 as esm2015
Compiling @angular/core : fesm5 as esm5
Compiling @angular/core : esm2015 as esm2015
Compiling @angular/core : esm5 as esm5
Compiling @angular/common : fesm2015 as esm2015
Compiling @angular/common : fesm5 as esm5
Compiling @angular/common : esm2015 as esm2015
Compiling @angular/common : esm5 as esm5
Compiling @angular/common/http : fesm2015 as esm2015
Compiling @angular/common/http : fesm5 as esm5
Compiling @angular/common/http : esm2015 as esm2015
Compiling @angular/common/http : esm5 as esm5
Compiling @angular/common/http/testing : fesm2015 as esm2015
Compiling @angular/common/http/testing : fesm5 as esm5
Compiling @angular/common/http/testing : esm2015 as esm2015
Compiling @angular/common/http/testing : esm5 as esm5
Compiling @angular/common/testing : fesm2015 as esm2015
Compiling @angular/common/testing : fesm5 as esm5
Compiling @angular/common/testing : esm2015 as esm2015
Compiling @angular/common/testing : esm5 as esm5
Compiling @angular/core/testing : fesm2015 as esm2015
Compiling @angular/core/testing : fesm5 as esm5
Compiling @angular/core/testing : esm2015 as esm2015
Compiling @angular/core/testing : esm5 as esm5
Compiling @angular/platform-browser : fesm2015 as esm2015
Compiling @angular/platform-browser : fesm5 as esm5
Compiling @angular/platform-browser : esm2015 as esm2015
Compiling @angular/platform-browser : esm5 as esm5
Compiling @angular/platform-browser-dynamic : fesm2015 as esm2015
Compiling @angular/platform-browser-dynamic : fesm5 as esm5
Compiling @angular/platform-browser-dynamic : esm2015 as esm2015
Compiling @angular/platform-browser-dynamic : esm5 as esm5
Compiling @angular/platform-browser/testing : fesm2015 as esm2015
Compiling @angular/platform-browser/testing : fesm5 as esm5
Compiling @angular/platform-browser/testing : esm2015 as esm2015
Compiling @angular/platform-browser/testing : esm5 as esm5
Compiling @angular/compiler/testing : fesm2015 as esm2015
Compiling @angular/compiler/testing : fesm5 as esm5
Compiling @angular/compiler/testing : esm2015 as esm2015
Compiling @angular/compiler/testing : esm5 as esm5
Compiling @angular/platform-browser-dynamic/testing : fesm2015 as esm2015
Compiling @angular/platform-browser-dynamic/testing : fesm5 as esm5
Compiling @angular/platform-browser-dynamic/testing : esm2015 as esm2015
Compiling @angular/platform-browser-dynamic/testing : esm5 as esm5
Compiling ng2-dragula : fesm2015 as esm2015
Compiling ng2-dragula : fesm5 as esm5
Compiling ng2-dragula : esm2015 as esm2015
Compiling ng2-dragula : esm5 as esm5
Compiling ng2-dragula : fesm2015 as esm2015
Error: Tried to overwrite /dev/temp/ivy-ngss-duplicated-entries/node_modules/ng2-dragula/dist/fesm2015/ng2-dragula.js.__ivy_ngcc_bak with an ngcc back up file, which is disallowed.
at InPlaceFileWriter.writeFileAndBackup (/dev/temp/ivy-ngss-duplicated-entries/node_modules/@angular/compiler-cli/ngcc/src/writing/in_place_file_writer.js:37:23)
at /dev/temp/ivy-ngss-duplicated-entries/node_modules/@angular/compiler-cli/ngcc/src/writing/in_place_file_writer.js:31:69
at Array.forEach (<anonymous>)
at InPlaceFileWriter.writeBundle (/dev/temp/ivy-ngss-duplicated-entries/node_modules/@angular/compiler-cli/ngcc/src/writing/in_place_file_writer.js:31:30)
at /dev/temp/ivy-ngss-duplicated-entries/node_modules/@angular/compiler-cli/ngcc/src/main.js:95:36
at Array.forEach (<anonymous>)
at Object.mainNgcc (/dev/temp/ivy-ngss-duplicated-entries/node_modules/@angular/compiler-cli/ngcc/src/main.js:67:21)
at /dev/temp/ivy-ngss-duplicated-entries/node_modules/@angular/compiler-cli/ngcc/main-ngcc.js:60:20
at /dev/temp/ivy-ngss-duplicated-entries/node_modules/@angular/compiler-cli/ngcc/main-ngcc.js:4:17
at Object.<anonymous> (/dev/temp/ivy-ngss-duplicated-entries/node_modules/@angular/compiler-cli/ngcc/main-ngcc.js:10:3)
π¬ Minimal Reproduction
- create package.json:
{
"name": "ivy-ngss-duplicated-entries",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"@angular/common": "8.0.0-beta.11",
"@angular/compiler": "8.0.0-beta.11",
"@angular/core": "8.0.0-beta.11",
"@angular/platform-browser": "8.0.0-beta.11",
"@angular/platform-browser-dynamic": "8.0.0-beta.11",
"rxjs": "6.4.0",
"zone.js": "0.9.0"
},
"devDependencies": {
"@angular/compiler-cli": "8.0.0-beta.11",
"@types/node": "8.9.4",
"ng2-dragula": "2.1.1",
"typescript": "~3.3.3333"
}
}
- install dependencies (yarn / npm i)
- execute
npx ivy-ngcc -l debug
Anything else relevant?
- See attached entryPoints-debug.png and entryPoints-output.json.txt files (debug screenshot and
entryPoints
array dump). - See
ng2-dragula
files listing here https://yarnpkg.com/en/package/ng2-dragula?files
So it looks like entryPoints
array includes duplicated ng2-dragula
entries (see 2 last items of the array).
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (7 by maintainers)
Top Results From Across the Web
Handling __ivy_ngcc_bak compiler errors - devioblog
__ivy_ngcc_bak with an ngcc back up file, which is disallowed. Well, I checked, and indeed, the file existed. Let's delete the *.
Read more >ng2-dragula | Simple drag and drop with ... - Valor Software
Drags don't trigger click events. Clicks don't end up in a drag, either. This is useful if you have elements that can be...
Read more >ng2-dragula in angular7 failed to compile - Stack Overflow
Show activity on this post. Using a default startup Angular-Cli 7 project and following the steps as described here: https://github.com/valor-Β ...
Read more >ng2-dragula - npm
Simple drag and drop with dragula. Latest version: 3.2.0, last published: 15 days ago. Start using ng2-dragula in your project by runningΒ ...
Read more >Drag & Drop in Your Angular Apps With ng2-dragula
ng2-dragula is an Angular 2+ wrapper for the popular Dragula drag ... JavaScript library for drag & drop, and ng2-dragula is a wrapper...
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
I just placed related issue here https://github.com/valor-software/ng2-dragula/issues/951 Letβs see maybe package.json has been shipped twice without specific intention.
This is due to the ng2-dragula package unfortunately having two copies of
package.json
andng2-dragular.metadata.json
which both point to the same files. One is at the root of the package (see https://unpkg.com/ng2-dragula@2.1.1/) and one is in thedist
folder (see https://unpkg.com/ng2-dragula@2.1.1/dist/). This makes theng2-dragula/dist
an Angular entry-point as well.Because they both point to the same source files, ngcc is trying to compile the same source twice.
I think the right solution would be to ask
ng2-dragula
to release a version that only has one lot ofpackage.json
files.