-
Notifications
You must be signed in to change notification settings - Fork 295
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
Angular cli 5 AOT gives Module not found can't resolve .ngfactory #285
Comments
removing |
we also have a similar issue with angular 4, which we weren't able to resolve, yet.
|
apparently, angular5 library builds are not compatible with angular4, see angular/angular#19607 |
Please check your typescript version! You say you use There are known issues with that in Angular. For Angular v4, please use a TypeScript 2.3.x. For Angular v5, please use a TypeScript v2.4.x. See #236 |
I encountered this issue this day after a big refactoring, with TS 2.6 and the latest builds of angular-cli, devkit and ng-packagr. It simply was a issue with some remaining imports from the wrong files. #285 (comment) seems to be related to that, as it leads, by another way, to wrong imports too. I don't think this issue is directly related to ng-packagr. Only the ngc error message is misleading. |
Ran into this error using a local npm group like @myorg. After much searching it turns out *.metadata.json in node_modules has the wrong "importAs" making ng serve --aot fail compilation. The fix is it has to be @myorg/mylibrary and this was being set from the field "name": "@myorg/mylibrary" in projects/mylibrary/package.json. |
Be careful to node_modules folder depth too. EDIT: Actually you can but your package.json name must reflect your directory {
"name": "@domain/shared/api"
}
|
This issue has been automatically locked due to inactivity. |
Type of Issue
Description
When building bundle with ng-packagr, installing it in Angular 5 app and then trying to AOT the application, the compiler throws the error that it's not able to find the referenced module.
How To Reproduce
Expected Behaviour
Should not display message since bundle is already build
Version Information
Workaround:
angular/angular-cli#8284 (comment)
Which is to include the library in the Include files of the tsconfig compilation
The text was updated successfully, but these errors were encountered: