michaeldoye / mat-progress-buttons

Very simple Angular6+ Material Design progress buttons
https://mat-progress-buttons.firebaseapp.com/
MIT License
110 stars 54 forks source link

build failed with error An accessor cannot be declared in an ambient context #84

Closed rashid-naico closed 3 years ago

rashid-naico commented 3 years ago

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

Windows10

Versions

 "dependencies": {
    "@angular-slider/ngx-slider": "^2.0.3",
    "@angular/animations": "^8.2.10",
    "@angular/cdk": "^8.2.3",
    "@angular/common": "^8.2.10",
    "@angular/compiler": "^8.2.10",
    "@angular/core": "^8.2.10",
    "@angular/flex-layout": "^8.0.0-beta.27",
    "@angular/forms": "^8.2.10",
    "@angular/http": "^7.2.15",
    "@angular/material": "^8.2.3",
    "@angular/platform-browser": "^8.2.10",
    "@angular/platform-browser-dynamic": "^8.2.10",
    "@angular/pwa": "^0.11.4",
    "@angular/router": "^8.2.10",
    "@angular/service-worker": "^8.2.10",
    "@angularclass/hmr-loader": "^3.0.4",
    "@compodoc/compodoc": "^1.1.7",
    "@mat-datetimepicker/core": "^2.0.1",
    "@ngrx/effects": "^8.4.0",
    "@ngrx/entity": "^8.4.0",
    "@ngrx/router-store": "^8.4.0",
    "@ngrx/store": "^8.4.0",
    "@ngrx/store-devtools": "^8.4.0",
    "@swimlane/ngx-charts": "^8.0.0",
    "@types/jwt-decode": "^2.2.1",
    "@types/socket.io-client": "^1.4.32",
    "mat-progress-buttons": "^9.1.1",
  },

Repro steps

npm install

returns error

The log given by the failure

ERROR in ../node_modules/mat-progress-buttons/lib/component/bar-button/bar-button.component.d.ts:13:9 - error TS1086: An accessor cannot be declared in an ambient context.
13     get configExists(): boolean;
           ~~~~~~~~~~~~
../node_modules/mat-progress-buttons/lib/component/bar-button/bar-button.component.d.ts:14:9 - error TS1086: An accessor cannot be declared in an ambient context.
14     get globalConfig(): MatProgressButtonOptions;
           ~~~~~~~~~~~~
../node_modules/mat-progress-buttons/lib/component/spinner-button/spinner-button.component.d.ts:13:9 - error TS1086: An accessor cannot be declared in an ambient context.
13     get configExists(): boolean;
           ~~~~~~~~~~~~
../node_modules/mat-progress-buttons/lib/component/spinner-button/spinner-button.component.d.ts:14:9 - error TS1086: An accessor cannot be declared in an ambient context.
14     get globalConfig(): MatProgressButtonOptions;
michaeldoye commented 3 years ago

This looks like it is caused by a mismatch in your versions of @angular/core and @angular/cdk

 "@angular/cdk": "^8.2.3", <-- here
 ...
 "@angular/core": "^8.2.10",  <-- and here

Either upgrade core or downgrade cdk. Preferably update to the latest versions :)