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.

Enable ivy in angular 8 - production build got failed

See original GitHub issue

🐞 Bug report

Command (mark with an x)

- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

Yes

Description

I have created an angular project with enabling ivy mode using below commands

ng new hello-ivy --enable-ivy

When I try to serve my application using below command

ng serve

it does not throw any compilation error but when I try to load this in browser [chrome] it throws below error:

Screenshot (259)

When i try to take prod build using below command

ng build --prod

it throws below compilation error :

Screenshot (260)

I don’t know why this issue occurs

πŸ”¬ Minimal Reproduction

  1. Download below sample - ivySample.zip

  2. Give below command to install our third-party package

npm i @syncfusion/ej2-angular grids

Or Download this and place it inside node_modules folder

🌍 Your Environment







     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / β–³ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 8.0.1
Node: 10.16.0
OS: win32 x64
Angular: 8.0.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.1
@angular-devkit/build-angular     0.800.1
@angular-devkit/build-optimizer   0.800.1
@angular-devkit/build-webpack     0.800.1
@angular-devkit/core              8.0.1
@angular-devkit/schematics        8.0.1
@angular/cli                      8.0.1
@ngtools/webpack                  8.0.1
@schematics/angular               8.0.1
@schematics/update                0.800.1
rxjs                              6.4.0
typescript                        3.4.5
webpack                           4.30.0

Anything else relevant?

Working fine angular 8 production build without ivy mode

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:40 (15 by maintainers)

github_iconTop GitHub Comments

5reactions
JoostKcommented, Oct 9, 2019

@kumaresan-subramani the issue with the type checker has not been resolved yet, as it’s quite tricky to deal with properly. We are working on implementing additional "strict*" flags so that the type checking can be less strict for the time being, which we hope to land within the coming two weeks.

3reactions
petebacondarwincommented, Jul 1, 2019

The error is in the IVY compiler template type checker… It looks, from first glance, like the compiler is not recognizing the <esj-grid> tag as a component that has an input called dataSource.

I think this is because the ej2 components use a dynamic mixin approach to creating their components and this component doesn’t statically declare dataSource as a property on the GridComponent class. See https://github.com/syncfusion/ej2-angular-ui-components/blob/2b12b0202728b6e634cb1c8adb9650b2843fdbd0/components/grids/src/grid/grid.component.ts

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I enable Ivy for Angular 8 or 9?
To stop using the Ivy compiler, set enableIvy to false in tsconfig.app.json , or remove it completely. Also remove "aot": true from your...
Read more >
Angular Ivy
Ivy is the code name for Angular's next-generation compilation and rendering pipeline. With the version 9 release of Angular, the new compiler and...
Read more >
All About Angular Engine Ivy in 5 mins
Ivy can be enabled in an existing project with the latest Angular version but also directly scaffold a project with Ivy. Enable Ivy...
Read more >
Real-World Angular Ivy Upgrade (v9-next) | by Jared Youtsey
Now, this application is already on Angular version 8. And it's building constantly without these errors. When we initially went from version 7Β ......
Read more >
error: failed to initialize angular compilation - ngcc failed.
As misha130 suggested in the comments, there was (a single) library not aligned with the latest Ivy changes which was causing the error....
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