[Ivy] (8.1.0-next.1) ng build ERRORs for @covalent, ngx-bootstrap, ngx-pipes
See original GitHub issue🐞 bug report
Affected Packages
@covalent
: https://github.com/Teradata/covalent
ngx-bootstrap
: https://github.com/valor-software/ngx-bootstrap
ngx-pipes
: https://github.com/danrevah/ngx-pipes
Description
I’m trying to upgrade to Ivy following the blog post.
But ng build
produces 3 different errors for 3 different packages (dependencies).
🔬 Minimal Reproduction
- Install the packages above.
ng update @angular/core --next
+ https://angular.io/guide/ivy#using-ivy-in-an-existing-projectng build
🔥 Exception or Errors
1. Compiling @covalent/core : module as esm5
ERROR in Tried to overwrite .../node_modules/@covalent/core/paging/paging-bar.component.d.ts.__ivy_ngcc_bak with an ngcc back up file, which is disallowed.
2. Compiling ngx-bootstrap/datepicker : module as esm5
ERROR in Expected array when reading property declarations
3. Compiling ngx-pipes : module as esm5
ERROR in Value at position 12 in the NgModule.declarationss of NgStringPipesModule is not a reference: [object Object]
🌍 Your Environment
Angular Version: 8.1.0-next.1
Angular CLI: 8.0.2
Node: 12.3.1
OS: linux x64
Angular: 8.1.0-next.1
(everything latest)
Anything else relevant?
Faced another error ERROR in Failed to list lazy routes: Unknown module '.../src/app/app.module#AppModule'.
even though I don’t have any lazy-loaded modules. Resolved it by adding "aot": true
to build options in angular.json
according to https://angular.io/guide/ivy.
Also, I don’t understand why Ivy needs to recompile the entire node_modules folder. The rationalization isn’t explained in the guide/blog post. (Is this a scalable approach?)
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (5 by maintainers)
Top GitHub Comments
@danrevah Thanks for looking into it. Looks like ngcc might have some issues with encodings. We should definitely try to improve the messaging here, or even try to support it in the first place.
The issue with
@covalent/core
is that it re-exports secondary entry-points from the primary entry-point. This causes the sources from the secondary entry-points to be compiled twice, which is disallowed in ngcc. @petebacondarwin Your #30591 should fix that right, given that Material follows the same approach?ngx-bootstrap/datepicker
uses__spread
fromtslib
, for which support landed in #30492 which will be innext.2
once it is released.I can’t spot what the reason for
ngx-pipes
to fail would be. Needs investigation.