13

Getting an error with mat-progress-button given below after updating from Angular 8 to Angular 9. It was working fine with Angular 8. Is MatProgressButton incompatible with Angular 9?

node_modules/mat-progress-buttons/esm2015/mat-progress-buttons.js:181:26 - error NG1010: Value at position 1 in the NgModule.imports of MatProgressButtonsModule is not a reference: [object Object]

The import looks like: import { MatProgressButtonsModule } from 'mat-progress-buttons';

My package.json looks like this:

  "dependencies": {
    "@angular/animations": "^9.0.2",
    "@angular/cdk": "^9.1.0",
    "@angular/common": "~9.0.2",
    "@angular/compiler": "~9.0.2",
    "@angular/core": "~9.0.2",
    "@angular/forms": "~9.0.2",
    "@angular/material": "^9.1.0",
    ...
    "@angular/router": "~9.0.2",
    "core-js": "^2.5.4",
    "mat-file-upload": "^1.3.2",
    "mat-progress-buttons": "^8.0.7",
    "rxjs": "~6.5.4",
    "tslib": "^1.10.0",
    "zone.js": "~0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.900.3",
    "@angular/cli": "~9.0.3",
    "@angular/compiler-cli": "~9.0.2",
    "@angular/language-service": "~9.0.2",
   ...
    "typescript": "^3.7.5"
  }
}

  • 1
    I have the same issue (here my [SO question](https://stackoverflow.com/questions/60726180/angular-9-value-at-position-x-in-the-ngmodule-imports-is-not-a-reference)) and it seems related to how Angular 9 treats deep imports, but I could not find any solution. – Francesco Mar 18 '20 at 11:53

2 Answers2

4

I had the same issue. It seems like there was some kind of error with the versions of the installed modules. I resolved it by deleting the node_module folder and reinitiating it with npm install.

JB17
  • 366
  • 5
  • 14
2

Deleted node_modules folder, dist folder, and package-lock.json file

npm cache clean --force
npm cache verify
npm i

Then it worked for me!

JvR
  • 1,022
  • 1
  • 11
  • 29
Divyanshi Mangal
  • 73
  • 1
  • 3
  • 11