[Angular 10.1.2] Error:Unexpected value 'LibraryModule in[..] imported by module.ts. Please add a @ngModule.annonation.
See original GitHub issueπ bug report
Affected Package
The issue is caused by package @angular/....Angular CLI: 10.1.2 Node: 10.16.0 OS: linux x64
Angular: 10.1.2 β¦ animations, cli, common, compiler, compiler-cli, core, forms β¦ platform-browser, platform-browser-dynamic, router Ivy Workspace: No
Package Version
@angular-devkit/architect 0.1001.2 @angular-devkit/build-angular 0.1001.2 @angular-devkit/build-ng-packagr 0.1001.2 @angular-devkit/core 10.1.2 @angular-devkit/schematics 10.1.2 @angular/cdk 10.2.1 @angular/material 10.1.1 @schematics/angular 10.1.2 @schematics/update 0.1001.2 ng-packagr 9.0.0 rxjs 6.6.3 typescript 4.0.2
Is this a regression?
Yes Angular 8 was working fine. Yes, the previous version in which this bug was not present was: ....Description
I have library module which is upgraded to angular 10.1.2 from angular 8.1.2. with enableIvy:false i have created the prod build. Upon using the library module into another application which is also upgraded angular 10.1.2 application i am getting the error.
A clear and concise description of the problem...π¬ Minimal Reproduction
https://stackblitz.com/...π₯ Exception or Error
ERROR: Unexpected value 'LibraryModule in /home/my-app/node_modules/@mylib/ui-libs/libs/library.module.d.ts' imported by the module 'SharedlibModule in /home/my-app/projects/sharedlib/src/lib/sharedlib.module.ts'. Please add a @NgModule annotation.
Can't bind to 'formConfig' since it isn't a known property of myapp-dynamic-form'.
1. If βmyapp-dynamic-form' is an Angular component and it has 'formConfig' input, then verify that it is part of this module.
2. If βmyapp-dynamic-form' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
π Your Environment
Angular Version:
Angular CLI: 10.1.2
Node: 10.16.0
OS: linux x64
Angular: 10.1.2
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: No
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.1001.2
@angular-devkit/build-angular 0.1001.2
@angular-devkit/build-ng-packagr 0.1001.2
@angular-devkit/core 10.1.2
@angular-devkit/schematics 10.1.2
@angular/cdk 10.2.1
@angular/material 10.1.1
@schematics/angular 10.1.2
@schematics/update 0.1001.2
ng-packagr 9.0.0
rxjs 6.6.3
typescript 4.0.2
Anything else relevant?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top GitHub Comments
@justinwilaby - the library that you are depending upon has been published (invalidly) after being compiled via Ivy. This is not supported. The
ngx-file-drop
library must be built in ViewEngine compiler mode before being published. Then you can also build your library in ViewEngine mode.The problem is therefore with the author of the
ngx-file-drop
library who should not have published a library built with Ivy. Closing as this is working as expected from the Angular compiler side of things.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.