Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS1086: An accessor cannot be declared in an ambient context. #273

Closed
azizkhani opened this issue Jun 12, 2020 · 3 comments
Closed

TS1086: An accessor cannot be declared in an ambient context. #273

azizkhani opened this issue Jun 12, 2020 · 3 comments

Comments

@azizkhani
Copy link

    
    ERROR in node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/base/leaflet-baselayers.directive.d.ts(22,9): error TS1086: An accessor cannot be declared in an ambient context.
    node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/base/leaflet-baselayers.directive.d.ts(25,9): error TS1086: An accessor cannot be declared in an ambient context.
    node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/control/leaflet-control-layers.directive.d.ts(21,9): error TS1086: An accessor cannot be declared in an ambient context.
    node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/control/leaflet-control-layers.directive.d.ts(22,9): error TS1086: An accessor cannot be declared in an ambient context.
    node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/leaflet-layers.directive.d.ts(24,9): error TS1086: An accessor cannot be declared in an ambient context.
    node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/leaflet-layers.directive.d.ts(25,9): error TS1086: An accessor cannot be declared in an ambient context.
    
@reblace
Copy link
Contributor

reblace commented Jun 13, 2020

I think this is caused by: microsoft/TypeScript#33939 - It's a backward compatibility with newer Typescript versions.

I suspect your solution is to upgrade Typescript and ng cli to make sure you're running the latest CLI and at least typescript 3.7+.

If not, you should post your package.json

@cranfillkd
Copy link

Updating to Angular 9 fixed this for me. https://update.angular.io/

@reblace
Copy link
Contributor

reblace commented Jun 29, 2020

Closing as upgrading Angular CLI is the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants