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.

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

When I run ngcc on a project with transloco I get the following error on the transloco build:


Compiling @ngneat/transloco : main as umd
Error: Expected UMD module file (/Users/timingensiep/Projects/bauhaus/gus-cms/node_modules/flat/index.js) to contain exactly one statement, but found 6.
    at UmdReflectionHost.computeUmdModule (/Users/timingensiep/Projects/bauhaus/gus-cms/node_modules/@angular/compiler-cli/ngcc/src/host/umd_host.js:75:23)
    at FactoryMap.factory (/Users/timingensiep/Projects/bauhaus/gus-cms/node_modules/@angular/compiler-cli/ngcc/src/host/umd_host.js:31:84)
    at FactoryMap.get (/Users/timingensiep/Projects/bauhaus/gus-cms/node_modules/@angular/compiler-cli/ngcc/src/utils.js:93:48)
    at UmdReflectionHost.getUmdModule (/Users/timingensiep/Projects/bauhaus/gus-cms/node_modules/@angular/compiler-cli/ngcc/src/host/umd_host.js:56:36)
    at UmdReflectionHost.getModuleStatements (/Users/timingensiep/Projects/bauhaus/gus-cms/node_modules/@angular/compiler-cli/ngcc/src/host/umd_host.js:70:34)
    at UmdReflectionHost.computeExportsOfUmdModule (/Users/timingensiep/Projects/bauhaus/gus-cms/node_modules/@angular/compiler-cli/ngcc/src/host/umd_host.js:84:53)
    at FactoryMap.factory (/Users/timingensiep/Projects/bauhaus/gus-cms/node_modules/@angular/compiler-cli/ngcc/src/host/umd_host.js:32:84)
    at FactoryMap.get (/Users/timingensiep/Projects/bauhaus/gus-cms/node_modules/@angular/compiler-cli/ngcc/src/utils.js:93:48)
    at UmdReflectionHost.getExportsOfModule (/Users/timingensiep/Projects/bauhaus/gus-cms/node_modules/@angular/compiler-cli/ngcc/src/host/umd_host.js:50:94)
    at DelegatingReflectionHost.getExportsOfModule (/Users/timingensiep/Projects/bauhaus/gus-cms/node_modules/@angular/compiler-cli/ngcc/src/host/delegating_host.js:71:34)

Expected behavior

It should run without errors.

Minimal reproduction of the problem with instructions

Create Angular 9.1.x Project and add transloco.

For bug reports please provide the STEPS TO REPRODUCE and if possible a MINIMAL DEMO of the problem, for that you could use our stackblitz example

What is the motivation / use case for changing the behavior?

To use Angular with Jest you need to run ngcc to make it work.

Environment


Angular version: X.Y.Z


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: v12.16.3
- Platform:  Mac

Others:

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
itayodcommented, Jun 4, 2020

I am closing this issue since it seems to be an issue of Angular’s compiler, for those who still have any difficulties I suggest you open an Issue in Angular’s repository.

2reactions
krokofantcommented, Jun 3, 2020

@giorgi0203 Since you’re specifying your versions with ~ you will get later versions than 9.1.4. Read the previous comments, you need to pin them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 9 - NGCC fails with an unhandled exception
This error may be because two or more entry-points overlap and ngcc has been asked to process some files more than once. You...
Read more >
Build failed after Update (NGCC failed) · Issue #37729 - GitHub
I believe that you are using angular-playground@6.2.x , which does not follow the Angular Package Format (APF) - and so ngcc struggles to...
Read more >
error: failed to initialize angular compilation - ngcc failed.
This error may be because two or more entry-points overlap and ngcc has been asked to process some files more than once. You...
Read more >
An unhandled exception occurred NGCC failed 2020 - YouTube
Dear Allafter Uninstall angular font-awesome from the package.json, kindly close the package.json opened file then restart the server ex: ng ...
Read more >
Fails to build with NGCC | Angular - EJ 2 Forums | Syncfusion
The cause for the reported issue is Syncfusion angular library is published in a minified format, which cannot be compiled for Ivy consumption...
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