error TS1086: An accessor cannot be declared in an ambient context.
Closed this issue · 2 comments
I followed the installation instructions and I got this error when running "ng serve"
ERROR in node_modules/angular-l10n/lib/directives/l10n-date.directive.d.ts(10,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/angular-l10n/lib/directives/l10n-number.directive.d.ts(10,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/angular-l10n/lib/directives/l10n-time-ago.directive.d.ts(11,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/angular-l10n/lib/directives/l10n-translate.directive.d.ts(8,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/angular-l10n/lib/directives/l10n-translate.directive.d.ts(9,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/angular-l10n/lib/directives/l10n-validate-date.directive.d.ts(17,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/angular-l10n/lib/directives/l10n-validate-number.directive.d.ts(17,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/angular-l10n/lib/services/l10n-routing.service.d.ts(10,17): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/angular-l10n/lib/services/l10n-routing.service.d.ts(11,17): error TS1086: An accessor cannot be declared in an ambient context.
Please, post your package.json
and your environment: ng version
.
Updating to angular 9 solved the problem.
I was on 8.2.14.
ng version:
Angular CLI: 8.3.28
Node: 12.14.1
OS: win32 x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
@angular-devkit/architect 0.803.28
@angular-devkit/build-angular 0.803.28
@angular-devkit/build-ng-packagr 0.803.28
@angular-devkit/build-optimizer 0.803.28
@angular-devkit/build-webpack 0.803.28
@angular-devkit/core 8.3.28
@angular-devkit/schematics 8.3.28
@angular/cli 8.3.28
@ngtools/webpack 8.3.28
@schematics/angular 8.3.28
@schematics/update 0.803.28
ng-packagr 5.7.1
rxjs 6.4.0
typescript 3.5.3
webpack 4.39.2
package.json:
"@angular/animations": "~8.2.14",
"@angular/common": "^8.2.14",
"@angular/compiler": "~8.2.14",
"@angular/core": "~8.2.14",
"@angular/forms": "^8.2.14",
"@angular/platform-browser": "~8.2.14",
"@angular/platform-browser-dynamic": "~8.2.14",
"@angular/router": "~8.2.14",