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:
When i try to take prod build using below command
ng build --prod
it throws below compilation error :
I donβt know why this issue occurs
π¬ Minimal Reproduction
-
Download below sample - ivySample.zip
-
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:
- Created 4 years ago
- Comments:40 (15 by maintainers)
Top 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 >
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
@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.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 calleddataSource
.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 theGridComponent
class. See https://github.com/syncfusion/ej2-angular-ui-components/blob/2b12b0202728b6e634cb1c8adb9650b2843fdbd0/components/grids/src/grid/grid.component.ts