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 compiling: Could not be resolved to an NgModule class

See original GitHub issue

🐞 bug report

Affected Package

The issue is caused by package @angular/core@9.0.0-rc.14 and earlier versions as well.

Is this a regression?

Yes, the previous version in which this bug was not present was: Angular 8.2.14

Description

I'm trying to add a package (ng-json-view) but it's not working as expected.

πŸ”¬ Minimal Reproduction

https://ng-run.com/edit/14a544kjZ4BafWAg7BUr?open=app%2Fapp.component.ts&aot=true

πŸ”₯ Exception or Error


error TS-996002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ARTWINPROcommented, Feb 10, 2020

Guys, i have some solution but im not sure how currect it is.

1. "buildOptimizer": false,
2. "enableIvy": true
3. "aot": false,

Before do this refactoring, application size is: 18 440KB; After: 17 887KB

1reaction
petebacondarwincommented, Feb 10, 2020

Thanks for the update @bthieblot. Glad it is now working. If there is a latest version of a library that has been fixed to work with Angular v9 then we will not be trying to support older versions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Appears in the NgModule.imports of AppModule, but could not ...
After updating my app from Angular 9 -> 10 -> 11, I received the NG6002 error for package "ngx-lightbox" when attempting ng build...
Read more >
Angular 8 ivy Error "Could not be resolved to an NgModule ...
DayPilot should work fine with the Ivy compiler. You can try creating a new Angular 8 project using the UI Builder (https://builder.daypilot.org) and...
Read more >
Understanding Angular Ivy Library Compilation | lacolaco/tech
In this post, I will explain how to compile Angular libraries with Ivy, which is now possible in Angular v11.1, and its details....
Read more >
Creating libraries - Angular
Angular CLI uses a tool called ng-packagr to create packages from your compiled code that can be published to npm. See Building libraries...
Read more >
The library (@angular/forms) which declares FormBuilder has ...
... but could not be resolved to an NgModule class. ... has not been processed correctly by ngcc, or is not compatible with...
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