error NG1010: Value at position 0 in the NgModule.declarations of Module is not a reference
See original GitHub issueπ Bug report
If I do a postinstall ngcc I get the following errors in our library
Error: Failed to compile entry-point @syncfusion/ej2-angular-calendars (main as umd) due to compilation errors:
node_modules/@syncfusion/ej2-angular-calendars/dist/ej2-angular-calendars.umd.js:174:31 - error NG1010: Value at position 0 in the NgModule.declarations of CalendarModule is not a reference
Value could not be determined statically.
174 declarations: [
~
175 exports.CalendarComponent
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
176 ],
~~~~~~~~~~~~~~~~~
node_modules/@syncfusion/ej2-angular-calendars/dist/ej2-angular-calendars.umd.js:175:21
175 exports.CalendarComponent
~~~~~~~~~~~~~~~~~~~~~~~~~
Unable to evaluate statically.
node_modules/@syncfusion/ej2-angular-calendars/dist/ej2-angular-calendars.umd.js:166:5 - error NG6002: Appears in the NgModule.imports of CalendarAllModule, but could not be resolved to an NgModule class.
Is it missing an @NgModule annotation?
166 var CalendarModule = /** @class */ (function () {
~~~~~~~~~~~~~~
node_modules/@syncfusion/ej2-angular-calendars/dist/ej2-angular-calendars.umd.js:166:5 - error NG6003: Appears in the NgModule.exports of CalendarAllModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class.
Is it missing an Angular annotation?
Is this a regression?
Working fine with out "postinstall": "ngcc"
π¬ Minimal Reproduction
-
download my sample - https://github.com/kumaresan-subramani/Syncfusion-Calendar-Error-1
-
then give
npm i
oryarn i
My reported issue will occurs.
π₯ Exception or Error
π Your Environment
"@angular/animations": "~10.1.0",
"@angular/common": "~10.1.0",
"@angular/compiler": "~10.1.0",
"@angular/core": "~10.1.0",
"@angular/forms": "~10.1.0",
"@angular/platform-browser": "~10.1.0",
"@angular/platform-browser-dynamic": "~10.1.0",
"@angular/router": "~10.1.0",
"@angular-devkit/build-angular": "~0.1001.0",
"@angular/cli": "~10.1.0",
"@angular/compiler-cli": "~10.1.0",
Anything else relevant? I have done some researching and found that below issue and tried everything which are reported in those issues but no luck for me.
https://github.com/angular/angular/issues/35255#issuecomment-637055168 - downgraded ts version same error https://github.com/angular/angular/issues/36673#issuecomment-615140449 - tried changed my module declaration
This is our component config -
Note: i am using ng-packagr
to generate my angular library
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
Angular 9: Value at position X in the NgModule.imports is not ...
js DE locale is imported as following: import 'moment/locale/de';. Compilation errors are also triggered:.
Read more >value at position 1 in the ngmodule.declarations of appmodule ...
js:174:31 - error NG1010: Value at position 0 in the NgModule.declarations of CalendarModule is not a reference Value could not be determined statically....
Read more >I am declaring material components as separate module. Error ...
Error 1. Value at position 15 in the NgModule.imports of MaterialModule is not a reference. Value could not be determined statically.
Read more >NgModule FAQ - Angular
NgModules help organize an application into cohesive blocks of functionality. This page answers the questions many developers ask about NgModule design andΒ ...
Read more >Error message Is it missing @NgModule annotation? NG6002
Error message Is it missing @ NgModule annotation? NG6002: Appears NgModule.imports AppModule Angular. Watch later. Share. Copy link.
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 FreeTop 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
Top GitHub Comments
I think the fixes appear in 10.1.6
Will do