question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[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

🔥 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:closed
  • Created 4 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
JoostKcommented, Jul 8, 2019

@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.

1reaction
JoostKcommented, Jun 13, 2019
  1. 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?

  2. ngx-bootstrap/datepicker uses __spread from tslib, for which support landed in #30492 which will be in next.2 once it is released.

  3. I can’t spot what the reason for ngx-pipes to fail would be. Needs investigation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

angular 13 ng build library fails (ivy partial compilation mode)
1 and upgrading my angular cli from 13.0.2 to 13.2.0. Once I got the package to install I generated a library with ng...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found