Appears in the NgModule.imports of <MyLibrary>, but could not be resolved to an NgModule class
See original GitHub issueπ bug report
Affected Package
The issue is caused by package @angular/compiler 9.0.0-rc.11Is this a regression?
Yes. In v8.2.14 it worked properly.Description
at my app, I using library built by me with angular v8.0.3 and @angular/material v.8.1.2 and ng-packagr. then, error occured after update app to angular v9.0.0-rc.11.
ERROR in Failed to compile entry-point my-library (es2015 as esm2015) due to compilation errors:
vendor/my-library/dist/mylibrary-shared-feedback-dialog/node_modules/@angular/material/dialog/typings/dialog-module.d.ts:8:22 - error NG6002: Appears in the NgModule.imports of MyLibrarySharedFeedbackDialogModule, but could not be resolved to an NgModule class
8 export declare class MatDialogModule {
A similar error occurs for the imported Angular Material Module.
π Your Environment
Angular Version:
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ β³ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 9.0.0-rc.10
Node: 12.14.0
OS: linux x64
Angular: 9.0.0-rc.11
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.900.0-rc.10
@angular-devkit/build-angular 0.900.0-rc.10
@angular-devkit/build-optimizer 0.900.0-rc.10
@angular-devkit/build-webpack 0.900.0-rc.10
@angular-devkit/core 9.0.0-rc.10
@angular-devkit/schematics 9.0.0-rc.10
@angular/cdk 9.0.0-rc.8
@angular/cli 9.0.0-rc.10
@angular/flex-layout 8.0.0-beta.27
@angular/material 9.0.0-rc.8
@angular/material-moment-adapter 9.0.0-rc.8
@ngtools/webpack 9.0.0-rc.10
@schematics/angular 9.0.0-rc.10
@schematics/update 0.900.0-rc.10
rxjs 6.5.3
typescript 3.7.5
webpack 4.41.2
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:18 (3 by maintainers)
Top Results From Across the Web
Appears in the NgModule.imports of AppModule, but could not ...
It is likely you have installed something as root. It maybe time to check out the project again using the user account and...
Read more >Answer: error NG6002: Appears in the NgModule.imports of ...
answer re: error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class ... Fixed it by...
Read more >error NG6002 - Angular - CodeDocu.com
Angular Error NG6002 Appears the NgModule imports of AppModule but could not be resolved to class at node modules common http 81 22...
Read more >'formgroup' does not appear to be an ngmodule class. - You.com
imports of AppModule, but could not be resolved to an NgModule class. This likely means that the library (@angular/common/http) which declares HttpClientModuleΒ ...
Read more >error NG6002: Appears in the NgModule.imports of <module ...
This likely means that the library (ngx-print) which declares NgxPrintModule has not been processed correctly by ngcc, or is not compatible with Angular...
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
Hi,
Created a new Angular 9 project and added angular material 9 from: using the command ng add @angular/material
I then followed the steps mentioned in the link to display a simple checkbox using Angular Material. The checkbox is displayed fine. However, the cli complains with the below error:
I then deleted the node_modules and did a npm install again. It seems to have fixed the issue.
Could you please try the following:
Repo: https://github.com/VedantKarpe/angular9
Guys, i have some solution but im not sure how currect it is.
Before do this refactoring, application size is: 18 440KB; After: 17 887KB