question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

  1. download my sample - https://github.com/kumaresan-subramani/Syncfusion-Calendar-Error-1

  2. then give npm i or yarn i

My reported issue will occurs.

πŸ”₯ Exception or Error

image

🌍 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 -

https://github.com/syncfusion/ej2-angular-ui-components/tree/master/components/calendars/src/calendar

Note: i am using ng-packagr to generate my angular library

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
petebacondarwincommented, Oct 15, 2020

I think the fixes appear in 10.1.6

1reaction
petebacondarwincommented, Oct 14, 2020

Will do

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found