New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ivy preview report: error TS-996002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class #30972
Comments
By the looks of it, 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
|
@JoostK Thanks! Waiting for fixes... |
Angular CLI: 8.1.0-beta.3 Package Version@angular-devkit/architect 0.801.0-beta.3
|
I'm hitting this as well. Repro steps:
Failure log
version info
|
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. |
Previously secondary entry-points, e.g `@angular/common/http`, were being resolved to the primary entry-point, e.g `@angular/common`. This meant that these entry-points were not being processed as part of a compilation leading to error messages. This change inverts the `tryResolvePackage` logic to attempt to use `require.resolve()` first and only looking in the parent directory of the typings file as a fallback if the main resolve fails. Fixes angular/angular#30972 (comment)
This PR should fix @StephenFluin's error - maybe also the original issue? |
Previously secondary entry-points, e.g `@angular/common/http`, were being resolved to the primary entry-point, e.g `@angular/common`. This meant that these entry-points were not being processed as part of a compilation leading to error messages. This change inverts the `tryResolvePackage` logic to attempt to use `require.resolve()` first and only looking in the parent directory of the typings file as a fallback if the main resolve fails. Fixes angular/angular#30972 (comment)
Hello, I have the same problem
my versions is
End my appModule ... where is error i'dont know:
|
This is still a problem indeed. For instance: EDIT: with version |
Can you confirm that you get the errors with the |
Hello everyone! I see this issue is closed, but I'm experiencing the same problem only with a different library. I'm using the latest angular cli at this time (8.2.0-next.2) and created a brand new app with ivy enabled. After installing the library from npm and building the app, the error is the same as reported above:
The steps to reproduce the issue is to add the
and then import the MbscModule and add it to the AppModule imports:
Is this still an issue with Ivy? The same library works when not using Ivy, and based on the error message I could not find anything else out there that resembled the problem. |
I'll take a look. |
We also run into this problem building our library with ivy enabled and ng-packagr on E.g. we have an icon component and other components reuse that one. So once we have
the build fails at this point. The icon module gets built before. |
@Phil147 - just to be clear, building libraries with IVY mode is not yet supported. You should still build your library with ViewEngine mode and publish it with ngpackagr. Then only run ngcc on the published package when it is being consumed in an app. |
@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? |
Hello, I have the same problem with a different library (DevExtreme). |
This is still a problem even with @vikerman can you please reopen this issue? |
@naveedahmed1 This problem can have many different causes, could you please open a new issue with a reproduction so we can investigate? |
@JoostK yes you are right, in my case the problem was with one of the plugin. |
@naveedahmed1 just for tracking purposes, what plugin was it? |
@StephenFluin one of them is sebholstein/angular-google-maps#1647 So, for testing I have disabled this plugin. The other was Another issue which I am having is related to |
@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 |
It seems that we are not realising that the |
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. |
@petebacondarwin I don't think the |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Previously secondary entry-points, e.g `@angular/common/http`, were being resolved to the primary entry-point, e.g `@angular/common`. This meant that these entry-points were not being processed as part of a compilation leading to error messages. This change inverts the `tryResolvePackage` logic to attempt to use `require.resolve()` first and only looking in the parent directory of the typings file as a fallback if the main resolve fails. Fixes angular/angular#30972 (comment)
Hi! I try to build another compex project with Ivy and get an error:
All libs from NPM:
https://www.npmjs.com/package/ng6-breadcrumbs
Whats wrong?
The text was updated successfully, but these errors were encountered: