question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

An accessor cannot be declared in an ambient context.

See original GitHub issue

@angular/core: 8.2.14 ngx-material-file-input: 2.1.1

EROR in node_modules/ngx-material-file-input/lib/file-input/file-input.component.d.ts(29,9): error TS1086: An accessor cannot be declared in an ambient context. node_1 | node_modules/ngx-material-file-input/lib/file-input/file-input.component.d.ts(30,9): error TS1086: An accessor cannot be declared in an ambient context. node_1 | node_modules/ngx-material-file-input/lib/file-input/file-input.component.d.ts(31,9): error TS1086: An accessor cannot be declared in an ambient context. node_1 | node_modules/ngx-material-file-input/lib/file-input/file-input.component.d.ts(32,9): error TS1086: An accessor cannot be declared in an ambient context. node_1 | node_modules/ngx-material-file-input/lib/file-input/file-input.component.d.ts(36,9): error TS1086: An accessor cannot be declared in an ambient context. node_1 | node_modules/ngx-material-file-input/lib/file-input/file-input.component.d.ts(37,9): error TS1086: An accessor cannot be declared in an ambient context. node_1 | node_modules/ngx-material-file-input/lib/file-input/file-input.component.d.ts(38,9): error TS1086: An accessor cannot be declared in an ambient context. node_1 | node_modules/ngx-material-file-input/lib/file-input/file-input.component.d.ts(39,9): error TS1086: An accessor cannot be declared in an ambient context. node_1 | node_modules/ngx-material-file-input/lib/file-input/file-input.component.d.ts(40,9): error TS1086: An accessor cannot be declared in an ambient context. node_1 | node_modules/ngx-material-file-input/lib/file-input/file-input.component.d.ts(41,9): error TS1086: An accessor cannot be declared in an ambient context. node_1 | node_modules/ngx-material-file-input/lib/file-input/file-input.component.d.ts(42,9): error TS1086: An accessor cannot be declared in an ambient context. node_1 | node_modules/ngx-material-file-input/lib/file-input/file-input.component.d.ts(50,9): error TS1086: An accessor cannot be declared in an ambient context. node_1 | node_modules/ngx-material-file-input/lib/model/file-input.model.d.ts(9,9): error TS1086: An accessor cannot be declared in an ambient context. node_1 | node_modules/ngx-material-file-input/lib/model/file-input.model.d.ts(10,9): error TS1086: An accessor cannot be declared in an ambient context.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

5reactions
mugambiwarwemacommented, Mar 25, 2020

@suhasghodk was right.

I downgraded(uninstalled) version 2.1.1 and Installed version 2.1.0

npm uninstall ngx-material-file-input

npm i ngx-material-file-input@2.1.0

Now all is well

4reactions
raframilcommented, Mar 31, 2020

I got the same problem with 2.1.1, downgrade to 2.1.0 solved it for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

TS1086: An accessor cannot be declared in ambient context
- error TS1086: An accessor cannot be declared in an ambient context. [...] Does somebody know a reason? I can't test my app...
Read more >
Fixing accessor cannot be declared in an ambient context error
Fixing accessor cannot be declared in an ambient context error in Angular Animations project with Ionic 4 and Angular 8.
Read more >
An accessor cannot be declared in an ambient context · Issue ...
The Angular Compiler requires TypeScript >=3.4.0 and <3.5.0 but 3.x.y was found instead. yes. i got this error and had to update angular...
Read more >
Angular 7 (An accessor cannot be declared in an ambient ...
Hello. I'm quite new to Angular and when I try to build --prod my angular apps, I get this errors: ERROR in ...
Read more >
An accessor cannot be declared in an ambient context
Hi,. I'm creating an app with language selection and when I try to run it it gives me the following error. Can someone...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found