riteshgandhi / ng-star-rating

Highly Customizable and Responsive Star Rating library built using Angular
MIT License
38 stars 10 forks source link

An accessor cannot be declared in an ambient context #24

Open kuldeeps1ngh opened 4 years ago

kuldeeps1ngh commented 4 years ago

Bug: ERROR in node_modules/ng-starrating/components/star-rating/star-rating.component.d.ts(32,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ng-starrating/components/star-rating/star-rating.component.d.ts(33,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ng-starrating/components/star-rating/star-rating.component.d.ts(34,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ng-starrating/components/star-rating/star-rating.component.d.ts(35,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ng-starrating/components/star-rating/star-rating.component.d.ts(36,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ng-starrating/components/star-rating/star-rating.component.d.ts(37,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ng-starrating/components/star-rating/star-rating.component.d.ts(43,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ng-starrating/components/star-rating/star-rating.component.d.ts(44,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ng-starrating/components/star-rating/star-rating.component.d.ts(45,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ng-starrating/components/star-rating/star-rating.component.d.ts(46,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ng-starrating/components/star-rating/star-rating.component.d.ts(47,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ng-starrating/components/star-rating/star-rating.component.d.ts(48,9): error TS1086: An accessor cannot be declared in an ambient context.

I am using angular 8 project with typscript 3.4.3 package.json details:

"private": true, "dependencies": { "@agm/core": "^1.0.0", "@angular/animations": "^8.0.1", "@angular/cdk": "^8.0.1", "@angular/common": "~8.0.0", "@angular/compiler": "~8.0.0", "@angular/core": "~8.0.0", "@angular/forms": "~8.0.0", "@angular/material": "^8.0.1", "@angular/platform-browser": "~8.0.0", "@angular/platform-browser-dynamic": "~8.0.0", "@angular/router": "~8.0.0", "@types/jquery": "^3.3.32", "jquery-datepicker": "^1.12.3", "ng-otp-input": "^1.4.2", "ng-starrating": "^1.0.20", "ngx-spinner": "^7.1.4", "ngx-toastr": "^10.0.4", "rxjs": "~6.4.0", "rxjs-compat": "^6.5.2", "time-ago-pipe": "^1.3.2", "tslib": "^1.9.0", "zone.js": "~0.9.1" }, "devDependencies": { "@angular-devkit/build-angular": "~0.800.0", "@angular/cli": "~8.0.2", "@angular/compiler-cli": "~8.0.0", "@angular/language-service": "~8.0.0", "@types/node": "~8.9.4", "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", "codelyzer": "^5.0.0", "jasmine-core": "~3.4.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~4.1.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.0.1", "karma-jasmine": "~2.0.1", "karma-jasmine-html-reporter": "^1.4.0", "protractor": "~5.4.0", "ts-node": "~7.0.0", "tslint": "~5.15.0", "typescript": "~3.4.3" }

After throwing error, project compiles and run but, this error prevents production build. Screenshot from 2020-03-28 17-39-39

kuldeeps1ngh commented 4 years ago

@riteshgandhi please check, and correct me if i am missing something.

riteshgandhi commented 4 years ago

@kuldeeps1ngh I'll take look asap

daemoNick commented 4 years ago

Any update on this issue?

ngstarrating
kuldeeps1ngh commented 4 years ago

For now, I have upgraded angular version to 9 and also using the latest typescript seems to working fine. follow this official doc to upgrade : https://update.angular.io/#8.0:9.0l2