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

An accessor cannot be declared in an ambient context. #667

Closed
its-dibo opened this issue Apr 23, 2020 · 6 comments · Fixed by #668
Closed

An accessor cannot be declared in an ambient context. #667

its-dibo opened this issue Apr 23, 2020 · 6 comments · Fixed by #668

Comments

@its-dibo
Copy link

its-dibo commented Apr 23, 2020

I recently updated firebase-functions and all fire base related packages, but I got an error : An accessor cannot be declared in an ambient context. when I tried to build my project.

before this update my project run and deployed successfully to firebase, no any other modification made.

error details:

> tsc -p firebase/tsconfig.json 
node_modules/firebase-functions/lib/apps.d.ts(26,13): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/firebase-functions/lib/apps.d.ts(33,21): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/firebase-functions/lib/function-builder.d.ts(53,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/firebase-functions/lib/function-builder.d.ts(66,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/firebase-functions/lib/function-builder.d.ts(100,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/firebase-functions/lib/function-builder.d.ts(114,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/firebase-functions/lib/function-builder.d.ts(121,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/firebase-functions/lib/function-builder.d.ts(128,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/firebase-functions/lib/function-builder.d.ts(137,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/firebase-functions/lib/function-builder.d.ts(150,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/firebase-functions/lib/function-builder.d.ts(159,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/firebase-functions/lib/function-builder.d.ts(165,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/firebase-functions/lib/handler-builder.d.ts(15,9): error TS1086: An accessor cannot be declared in an ambient context.

jpg

@google-oss-bot
Copy link
Collaborator

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@JaquelinaG
Copy link

@eng-dibo I have the same problem today, It worked fine yesterday. Have you found a solution?

@its-dibo
Copy link
Author

its-dibo commented Apr 23, 2020

No, but it seems you have to update your typescript version.
@JaquelinaG

@joehan
Copy link
Contributor

joehan commented Apr 23, 2020

Hey all, thanks for reporting this. What typescript version were you on when you got this error, and what typescript version did you downgrade to when you fixed it?

@its-dibo
Copy link
Author

at the time of this error appeared, I used the same Typescript as before updating firebase-tools.
i.e: I didn't update Typescript.
@joehan

@laurenzlong
Copy link
Contributor

laurenzlong commented Apr 24, 2020

Thanks for reporting! Looks like we needed to update our TS version. Will be addressed in #668. For now you can resolve by running this in your functions directory:

npm i typescript@latest --save-dev

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

Successfully merging a pull request may close this issue.

5 participants