You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ivy preview report: error TS-996002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class #30972
Hi! I try to build another compex project with Ivy and get an error:
ERROR in node_modules/ng6-breadcrumbs/lib/breadcrumbs.module.d.ts(1,22): error TS-996002: Appears in the NgModule.imports of AppModule,
but could not be resolved to an NgModule class
. Once we have config file support per #30591 it should become possible to re-wire the metadata file to one of the metadata files nested in the package.
ERROR in ../node_modules/@angular/common/http/http.d.ts:2799:22 - error TS-996002: Appears in the NgModule.imports of ChatModule, but could not be resolved to an NgModule class
2799 export declare class HttpClientModule {
~~~~~~~~~~~~~~~~
../node_modules/@angular/common/http/http.d.ts:2799:22 - error TS-996002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class
2799 export declare class HttpClientModule {
~~~~~~~~~~~~~~~~
git clone git@github.com:StephenFluin/fluin.io.git
cd fluin.io
yarn
# enable Ivy in /src/tsconfig.json
ng serve
Failure log
WARNING in Unknown member type: "[key: string]: (data: any) => void;
ERROR in ../node_modules/@angular/common/http/http.d.ts:2799:22 - error TS-996002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class
2799 export declare class HttpClientModule {
~~~~~~~~~~~~~~~~
../node_modules/@angular/platform-browser/animations/animations.d.ts:37:22 - error TS-996002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class
37 export declare class BrowserAnimationsModule {
~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/@angular/material/card/typings/card-module.d.ts:8:22 - error TS-996002: Appears in the NgModule.imports of AdminModule, but could not be resolved to an NgModule class
8 export declare class MatCardModule {
~~~~~~~~~~~~~
../node_modules/@angular/material/input/typings/input-module.d.ts:8:22 - error TS-996002: Appears in the NgModule.imports of AdminModule, but could not be resolved to an NgModule class
8 export declare class MatInputModule {
~~~~~~~~~~~~~~
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
ℹ 「wdm」: Failed to compile.
I think this might be a timing issue where webpack's cache is providing the un-processed .d.ts files to ngtsc rather than the ones that ngcc has modified.
For instance: node_modules/@angular/common/common.d.ts(115,22): error TS-996002: Appears in the NgModule.imports of CoreModule, but could not be resolved to an NgModule class
Can you confirm that you get the errors with the next versions of Angular (i.e. currently 8.2.0-next.1)? I see that @CisSasGot appears to be using 8.1.0, which does not contain a number of IVY fixes.
Hello, I have the same problem with a different library (DevExtreme).
Here is an example https://github.com/ovchinnikov/dx-ivy
Any help is greatly appreciated.
The other was ng2-img-cropper, which is now maintained as a new plugin ngx-img-cropper, upgrading to ngx-img-cropper fixed the issue.
Another issue which I am having is related to flex-layout, I initially reported the issue on flex-layout repo but Angular team moved it to Angular repo since it's related to IVY. #32064
@petebacondarwin Hi there! Did you have a chance to look into the problem I posted? Is this still an IVY issue or is the problem with @mobiscroll/angular-lite package? Thanks for your time!
It seems that we are not realising that the MbscModule is not being noticed by ngcc and so not being processed. I wonder if this is because we are processing the minified code, where multiple classes are declared in a single var statement separated by commas, and ngcc might be only looking at the first item in each declaration list?
Tracking internally as FW-1505
@petebacondarwin I don't think the var statement could be the issue here (or not only that).
I created an example which reproduces the error, with a dummy module and component. The compiled files are in src/mobiscroll, along with the generated .d.ts and metadata.json files.
Everything works as expected once Ivy is de-activated.
Any idea?
angular-automatic-lock-bot commented on Sep 27, 2019
Activity
JoostK commentedon Jun 11, 2019
By the looks of it,
ng6-breadcrumbsdoes not have its Angular metadata JSON file next to the root typings. Instead, the metadata files are hidden inside the package, next to each source file.The relevant code in ngcc can be found here:
angular/packages/compiler-cli/ngcc/src/packages/entry_point.ts
Lines 91 to 101 in 83141fe
kolkov commentedon Jun 11, 2019
@JoostK Thanks! Waiting for fixes...
kunl commentedon Jun 25, 2019
Angular CLI: 8.1.0-beta.3
Node: 12.4.0
OS: darwin x64
Angular: 8.1.0-next.3
... common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
@angular-devkit/architect 0.801.0-beta.3
@angular-devkit/build-angular 0.801.0-beta.3
@angular-devkit/build-optimizer 0.801.0-beta.3
@angular-devkit/build-webpack 0.801.0-beta.3
@angular-devkit/core 8.1.0-beta.3
@angular-devkit/schematics 8.1.0-beta.3
@angular/cli 8.1.0-beta.3
@ngtools/webpack 8.1.0-beta.3
@schematics/angular 8.1.0-beta.3
@schematics/update 0.801.0-beta.3
rxjs 6.5.2
typescript 3.4.5
webpack 4.35.0
StephenFluin commentedon Jun 27, 2019
I'm hitting this as well.
Repro steps:
Failure log
version info
petebacondarwin commentedon Jun 27, 2019
I think this might be a timing issue where webpack's cache is providing the un-processed .d.ts files to ngtsc rather than the ones that ngcc has modified.
fix(@ngtools/webpack): NGCC should process secondary entry-points
petebacondarwin commentedon Jun 28, 2019
This PR should fix @StephenFluin's error - maybe also the original issue?
angular/angular-cli#14934
fix(@ngtools/webpack): NGCC should process secondary entry-points
j-Cis commentedon Jul 10, 2019
Hello, I have the same problem
my versions is
End my appModule ... where is error i'dont know:
lwensveen commentedon Jul 10, 2019
This is still a problem indeed.
For instance:
node_modules/@angular/common/common.d.ts(115,22): error TS-996002: Appears in the NgModule.imports of CoreModule, but could not be resolved to an NgModule classEDIT: with version
8.2.0-next.0petebacondarwin commentedon Jul 10, 2019
Can you confirm that you get the errors with the
nextversions of Angular (i.e. currently 8.2.0-next.1)? I see that @CisSasGot appears to be using 8.1.0, which does not contain a number of IVY fixes.4 remaining items
Phil147 commentedon Jul 24, 2019
@petebacondarwin thx for the heads up! but thx to the ivy checks we found that we didn't export everything in some public-api.ts files 👍 😄
do you know when library builds are planned to be supported?
ovchinnikov commentedon Jul 26, 2019
Hello, I have the same problem with a different library (DevExtreme).
Here is an example https://github.com/ovchinnikov/dx-ivy
Any help is greatly appreciated.
naveedahmed1 commentedon Aug 8, 2019
This is still a problem even with
9.0.0-next.0. I am receiving this error even with my apps internal shared modules.@vikerman can you please reopen this issue?
JoostK commentedon Aug 8, 2019
@naveedahmed1 This problem can have many different causes, could you please open a new issue with a reproduction so we can investigate?
naveedahmed1 commentedon Aug 9, 2019
@JoostK yes you are right, in my case the problem was with one of the plugin.
StephenFluin commentedon Aug 9, 2019
@naveedahmed1 just for tracking purposes, what plugin was it?
naveedahmed1 commentedon Aug 9, 2019
@StephenFluin one of them is
@agm/core, there's a pull request pending, which should fix this issue.sebholstein/angular-google-maps#1647
So, for testing I have disabled this plugin.
The other was
ng2-img-cropper, which is now maintained as a new pluginngx-img-cropper, upgrading tongx-img-cropperfixed the issue.Another issue which I am having is related to
flex-layout, I initially reported the issue onflex-layoutrepo but Angular team moved it to Angular repo since it's related to IVY. #32064andrasz commentedon Aug 12, 2019
@petebacondarwin Hi there! Did you have a chance to look into the problem I posted? Is this still an IVY issue or is the problem with
@mobiscroll/angular-litepackage? Thanks for your time!petebacondarwin commentedon Aug 12, 2019
It seems that we are not realising that the
MbscModuleis not being noticed by ngcc and so not being processed. I wonder if this is because we are processing the minified code, where multiple classes are declared in a singlevarstatement separated by commas, and ngcc might be only looking at the first item in each declaration list?Tracking internally as FW-1505
Ketec commentedon Aug 22, 2019
Tried with 9.0.0-next.3, the problem still exists with MbscModule.
With 9 supposedly having Ivy by default - this is going to be a bigger and more widespread problem.
dioslaska commentedon Aug 27, 2019
@petebacondarwin I don't think the
varstatement could be the issue here (or not only that).I created an example which reproduces the error, with a dummy module and component. The compiled files are in
src/mobiscroll, along with the generated.d.tsandmetadata.jsonfiles.Everything works as expected once Ivy is de-activated.
Any idea?
angular-automatic-lock-bot commentedon Sep 27, 2019
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.
fix(@ngtools/webpack): NGCC should process secondary entry-points
fix(@ngtools/webpack): NGCC should process secondary entry-points