4.1.2 breaks our build with " error TS1086: An accessor cannot be declared in an ambient context."
See original GitHub issueWe do not use gtoken directly and this started happening just after 4.1.2 rolled out. It seems to be a very similar issue we reported here for google-gax.
.../node_modules/gtoken/build/src/index.d.ts:32:9 - error TS1086: An accessor cannot be declared in an ambient context.
32 get accessToken(): string | undefined;
~~~~~~~~~~~
.../node_modules/gtoken/build/src/index.d.ts:33:9 - error TS1086: An accessor cannot be declared in an ambient context.
33 get idToken(): string | undefined;
~~~~~~~
.../node_modules/gtoken/build/src/index.d.ts:34:9 - error TS1086: An accessor cannot be declared in an ambient context.
34 get tokenType(): string | undefined;
~~~~~~~~~
.../node_modules/gtoken/build/src/index.d.ts:35:9 - error TS1086: An accessor cannot be declared in an ambient context.
35 get refreshToken(): string | undefined;
~~~~~~~~~~~~
Our environment:
$ node --version
v10.16.2
$ yarn --version
1.17.3
$ tsc --version
Version 3.5.3
Workaround: In package.json add:
"resolutions": {
"gtoken": "4.1.1"
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:18 (6 by maintainers)
Top Results From Across the Web
TS1086: An accessor cannot be declared in ambient context
This is first time for me when i have problem like this inside angular with typescript Errors looks like this: ERROR in ../../node_modules/@ ......
Read more >Angular 7 (An accessor cannot be declared in an ambient ...
I try to build --prod my angular apps, I get this errors: ... error TS1086: A n accessor cannot be declared in an...
Read more >An accessor cannot be declared in an ambient context. after ...
Hi there, i am trying to upgrade the babylon version to try the new stuff. However after update i am flooded with errors...
Read more >error TS1086: An accessor cannot be declared in an ambient ...
d.ts(29,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/@angular/cdk/a11y/focus-trap ...
Read more >Angular build errors - Material Design for Bootstrap
p>When trying to build or serve my angular application, the console outputs the ... error TS1086: An accessor cannot be declared in an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It seems that in 4.1.2 you upgraded the typescript compiler to 3.7.0 from 3.6.0 and this generates type definition file that is not working with us who still use earlier versions.
@alexander-fenster just to say that v4.1.3 isn’t available on npm at the moment. Not sure if you intended to do a release yet