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.

Ivyenable compilation issues in angular 9

See original GitHub issue

πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘

Please help us process issues more efficiently by filing an issue using one of the following templates:

https://github.com/angular/angular/issues/new/choose

Thank you!

πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘

Getting the compilation errors after upgrading from angular 7 to angular 9 and enabled Ivy option. When i set below configuration in ts-config its compiling

"angularCompilerOptions": {
       "enableIvy": false,
       "preserveWhitespaces": true
   }

Angular CLI: 9.1.11 Node: 12.16.1 OS: win32 x64

Angular: 9.1.12 … animations, common, compiler, compiler-cli, core, forms … platform-browser, platform-browser-dynamic, platform-server … router, upgrade Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.901.11 @angular-devkit/build-angular 0.901.11 @angular-devkit/build-optimizer 0.901.11 @angular-devkit/build-webpack 0.901.11 @angular-devkit/core 9.1.11 @angular-devkit/schematics 9.1.11 @angular/cli 9.1.11 @angular/http 7.2.11 @ngtools/webpack 7.3.9 @schematics/angular 9.1.11 @schematics/update 0.901.11 rxjs 6.6.0 typescript 3.8.3 webpack 4.44.1

Failed to compile.

node_modules/@angular/platform-browser/platform-browser.d.ts:44:22 - error NG6002: Appears in the NgModule.imports of SharedModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/platform-browser) which declares BrowserModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

44 export declare class BrowserModule {
                        ~~~~~~~~~~~~~
node_modules/@angular/forms/forms.d.ts:2574:22 - error NG6002: Appears in the NgModule.imports of SharedModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/forms) which declares FormsModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

2574 export declare class FormsModule {
                          ~~~~~~~~~~~
node_modules/@angular/forms/forms.d.ts:2574:22 - error NG6002: Appears in the NgModule.imports of WorkPermitsModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/forms) which declares FormsModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

2574 export declare class FormsModule {
                          ~~~~~~~~~~~
node_modules/@angular/common/common.d.ts:115:22 - error NG6002: Appears in the NgModule.imports of WorkPermitsModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/common) which declares CommonModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

115 export declare class CommonModule {
                         ~~~~~~~~~~~~
src/shared/shared.module.ts:192:14 - error NG6002: Appears in the NgModule.imports of WorkPermitsModule, but itself has errors

192 export class SharedModule {
                 ~~~~~~~~~~~~
src/work-permits/work-permits.routing.module.ts:77:14 - error NG6002: Appears in the NgModule.imports of WorkPermitsModule, but could not be resolved to an NgModule class.

Is it missing an @NgModule annotation?

77 export class WorkPermitsRoutingModule {}
                ~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/ng2-pdf-viewer/src/app/pdf-viewer/pdf-viewer.module.d.ts:6:22 - error NG6002: Appears in the NgModule.imports of WorkPermitsModule, but could not be resolved to an NgModule class.

This likely means that the library (ng2-pdf-viewer) which declares PdfViewerModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

6 export declare class PdfViewerModule {
                       ~~~~~~~~~~~~~~~
node_modules/@uirouter/angular-hybrid/angular-hybrid.d.ts:94:53 - error NG6005: UIRouterUpgradeModule.forChild returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.

94     static forChild(module?: NgHybridStatesModule): ModuleWithProviders;
                                                       ~~~~~~~~~~~~~~~~~~~
node_modules/@uirouter/angular-hybrid/angular-hybrid.d.ts:94:53 - error NG6005: UIRouterUpgradeModule.forChild returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.

94     static forChild(module?: NgHybridStatesModule): ModuleWithProviders;
                                                       ~~~~~~~~~~~~~~~~~~~
node_modules/@uirouter/angular-hybrid/angular-hybrid.d.ts:94:53 - error NG6005: UIRouterUpgradeModule.forChild returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.

94     static forChild(module?: NgHybridStatesModule): ModuleWithProviders;
                                                       ~~~~~~~~~~~~~~~~~~~
node_modules/@angular/forms/forms.d.ts:2574:22 - error NG6002: Appears in the NgModule.imports of LessonsLearnedModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/forms) which declares FormsModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

2574 export declare class FormsModule {
                          ~~~~~~~~~~~
node_modules/@angular/common/common.d.ts:115:22 - error NG6002: Appears in the NgModule.imports of LessonsLearnedModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/common) which declares CommonModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

115 export declare class CommonModule {
                         ~~~~~~~~~~~~
src/shared/shared.module.ts:192:14 - error NG6002: Appears in the NgModule.imports of LessonsLearnedModule, but itself has errors

192 export class SharedModule {
                 ~~~~~~~~~~~~
src/lessons-learned/lessons-learned.routing.module.ts:41:14 - error NG6002: Appears in the NgModule.imports of LessonsLearnedModule, but could not be resolved to an NgModule class.

Is it missing an @NgModule annotation?

41 export class LessonsLearnedRoutingModule {}
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@uirouter/angular-hybrid/angular-hybrid.d.ts:94:53 - error NG6005: UIRouterUpgradeModule.forChild returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.

94     static forChild(module?: NgHybridStatesModule): ModuleWithProviders;
                                                       ~~~~~~~~~~~~~~~~~~~
node_modules/@angular/forms/forms.d.ts:2574:22 - error NG6002: Appears in the NgModule.imports of WorkOrdersModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/forms) which declares FormsModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

2574 export declare class FormsModule {
                          ~~~~~~~~~~~
node_modules/@angular/common/common.d.ts:115:22 - error NG6002: Appears in the NgModule.imports of WorkOrdersModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/common) which declares CommonModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

115 export declare class CommonModule {
                         ~~~~~~~~~~~~
src/shared/shared.module.ts:192:14 - error NG6002: Appears in the NgModule.imports of WorkOrdersModule, but itself has errors

192 export class SharedModule {
                 ~~~~~~~~~~~~
src/work-orders/work-orders.routing.module.ts:63:14 - error NG6002: Appears in the NgModule.imports of WorkOrdersModule, but could not be resolved to an NgModule class.

Is it missing an @NgModule annotation?

63 export class WorkOrdersRoutingModule {}
                ~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@uirouter/angular-hybrid/angular-hybrid.d.ts:94:53 - error NG6005: UIRouterUpgradeModule.forChild returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.

94     static forChild(module?: NgHybridStatesModule): ModuleWithProviders;
                                                       ~~~~~~~~~~~~~~~~~~~
node_modules/@angular/forms/forms.d.ts:2574:22 - error NG6002: Appears in the NgModule.imports of CustomerFormsModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/forms) which declares FormsModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

2574 export declare class FormsModule {
                          ~~~~~~~~~~~
node_modules/@angular/common/common.d.ts:115:22 - error NG6002: Appears in the NgModule.imports of CustomerFormsModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/common) which declares CommonModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

115 export declare class CommonModule {
                         ~~~~~~~~~~~~
src/shared/shared.module.ts:192:14 - error NG6002: Appears in the NgModule.imports of CustomerFormsModule, but itself has errors

192 export class SharedModule {
                 ~~~~~~~~~~~~
src/customer-forms/customer-forms.routing.module.ts:64:14 - error NG6002: Appears in the NgModule.imports of CustomerFormsModule, but could not be resolved to an NgModule class.

Is it missing an @NgModule annotation?

64 export class CustomerFormsRoutingModule {}
                ~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@uirouter/angular-hybrid/angular-hybrid.d.ts:94:53 - error NG6005: UIRouterUpgradeModule.forChild returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.

94     static forChild(module?: NgHybridStatesModule): ModuleWithProviders;
                                                       ~~~~~~~~~~~~~~~~~~~
node_modules/@angular/forms/forms.d.ts:2574:22 - error NG6002: Appears in the NgModule.imports of IsolationsModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/forms) which declares FormsModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

2574 export declare class FormsModule {
                          ~~~~~~~~~~~
node_modules/@angular/common/common.d.ts:115:22 - error NG6002: Appears in the NgModule.imports of IsolationsModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/common) which declares CommonModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

115 export declare class CommonModule {
                         ~~~~~~~~~~~~
src/shared/shared.module.ts:192:14 - error NG6002: Appears in the NgModule.imports of IsolationsModule, but itself has errors

192 export class SharedModule {
                 ~~~~~~~~~~~~
src/isolations/isolations.routing.module.ts:65:14 - error NG6002: Appears in the NgModule.imports of IsolationsModule, but could not be resolved to an NgModule class.

Is it missing an @NgModule annotation?

65 export class IsolationsRoutingModule {}
                ~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@angular/forms/forms.d.ts:2574:22 - error NG6002: Appears in the NgModule.imports of PlotPlansModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/forms) which declares FormsModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

2574 export declare class FormsModule {
                          ~~~~~~~~~~~
node_modules/@angular/platform-browser/platform-browser.d.ts:44:22 - error NG6002: Appears in the NgModule.imports of PlotPlansModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/platform-browser) which declares BrowserModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

44 export declare class BrowserModule {
                        ~~~~~~~~~~~~~
node_modules/@angular/common/common.d.ts:115:22 - error NG6002: Appears in the NgModule.imports of PlotPlansModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/common) which declares CommonModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

115 export declare class CommonModule {
                         ~~~~~~~~~~~~
src/shared/shared.module.ts:192:14 - error NG6002: Appears in the NgModule.imports of PlotPlansModule, but itself has errors

192 export class SharedModule {
                 ~~~~~~~~~~~~
src/plot-plans/plot-plans.routing.module.ts:20:14 - error NG6002: Appears in the NgModule.imports of PlotPlansModule, but could not be resolved to an NgModule class.

Is it missing an @NgModule annotation?

20 export class PlotPlansRoutingModule {}
                ~~~~~~~~~~~~~~~~~~~~~~
node_modules/@uirouter/angular-hybrid/angular-hybrid.d.ts:94:53 - error NG6005: UIRouterUpgradeModule.forChild returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.

94     static forChild(module?: NgHybridStatesModule): ModuleWithProviders;
                                                       ~~~~~~~~~~~~~~~~~~~
node_modules/@uirouter/angular-hybrid/angular-hybrid.d.ts:93:52 - error NG6005: UIRouterUpgradeModule.forRoot returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.

93     static forRoot(module?: NgHybridStatesModule): ModuleWithProviders;
                                                      ~~~~~~~~~~~~~~~~~~~

Any one help me to resolve this.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:24 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
petebacondarwincommented, Aug 25, 2020

Actually if you are not using CLI then you probably don’t want to use --create-ivy-entry-points since that is only understandable by the particular webpack configuration used in CLI.

0reactions
angular-automatic-lock-bot[bot]commented, Nov 19, 2020

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I enable Ivy for Angular 8 or 9? - Stack Overflow
Using Ivy in an existing project : To update an existing project to use Ivy, set the enableIvy option in the angularCompilerOptions in...
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 Perks, No Hassle: An Angular 9 Tutorial - Toptal
We are using two arguments in our ng new command: --create-application=false will tell the CLI to only generate workspace files.
Read more >
Big surprise after compile with ivy : r/Angular2 - Reddit
We have a large application consist of 115 modules and 702 components in Angular. After compiling the project with ivy, we came across...
Read more >
how to create ivy build angular 9 Code Example
"compilerOptions": { "module": "esnext", // ... }, "angularCompilerOptions": { "enableIvy": true, "allowEmptyCodegenFiles": true } }
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