-
Notifications
You must be signed in to change notification settings - Fork 203
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
error TS1005: ';' expected on tsc #404
Comments
I found a few problems with this issue:
|
Could you try to update TypeScript first? |
Hi @agordeev thanks for filing - can you try @merlinnot 's suggestion and change your package.json typescript declataion to this: |
Can confirm bumping typescript to |
|
Awesome, thanks everyone! Glad your issue was resolved @agordeev :) |
I upgraded typescript to 3.3.1 which solved this issue. |
Seeing as caused issues for a few people, we have now added the mention of TypeScript update into the release notes for v2.2.0. Thanks again everyone :) |
node_modules/firebase-functions/lib/function-builder.d.ts(60,116): error TS1005: ';' expected. npm ERR! A complete log of this run can be found in: Error: functions predeploy error: Command terminated with non-zero exit code2 |
@RUPALAVECINO did you try updating to firebase-admin@^7.0.0? I ran It could be that package(firebase-admin), or another peer dependency preventing it from installing. |
When working on webpack changing |
Sorry but there's no clear answer for me, can anyone put something to clearify it please? |
Sure. This library uses syntax introduced in TypeScript 3.4, which allows us to provide better experience to our users by having better autocompletion and stricter compiler (static) checks, so your code breaks less in runtime. The specific syntax that causes the issue for you is const assertion ( You need to update your TypeScript compiler to at least this version, by running e.g. As a side note, I can recommend automatic your dependency update process by using tools like [Renovate](npm i --save-dev typescript@latest), which take this burden off your shoulders. |
Sorry but it doesnt work still, i did it before |
Please provide a minimal repro so I can reproduce it and help. Otherwise it's impossible. |
Sorry i tried everything but doesnt work.... cannot put typescript last version, its incompatible with angular compiler |
Please need help to fix it, its very annoying.... |
Angular requires TypeScript compiler from range https://github.com/angular/angular/blob/c7542a1d09b27b027a0367a1f3732a908cdd617a/package.json#L111 |
Errors:
|
If you use |
i use back old version thats work.
|
@merlinnot I have made sure to upgrade the global tsc too, and also made sure that I was using the global one. Not working. I forced using the local tsc too. None of the approaches worked. @kkusanagi I will try those versions asap, thanks: |
@Spiralis I've found a combination of the most updated versions that appears to work for me: "dependencies": { |
@Spiralis These are the most updated versions that appear to work: "dependencies": { |
I tried to produce a minimal case to reproduce and it all worked. However, as I moved the functions folder into the same project as my netxjs/react/firestore typescript application (using yarn), the compilation failed. |
If anyone is able to provide a reproduction, I'll gladly fix it. But it seems to me that it's just a matter of TypeScript version. |
Well. I am not sure anymore. I have had different errors. But, it seems to me that I am not able to set this up as a sub-folder in my main firebase repo. That is, where I host my typescript nextjs firebase project, using yarn. I can set it up as a separate folder and repo it seems, but within that repo, no go. So, I have made a separate repo for it now. |
I think I have the latest ts, tslint, firebase-admin,firebase-functions and it doesn't work…
and I get this…
also…
EDIT: |
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
Installing the latest version of typescript globally |
This worked for me:
|
how to get rid of error TS 1005 |
how do you fix a ts(10005) error |
installing updated version of typescript helped for me |
npm install typescript --save-dev It works. Thanks. version occur in "devDependencies": "typescript": "^3.9.7" |
I tried:
But it's not work.
How i can fix that???((((( |
Similarly to @ms-prasanth I'm on |
I had the same problem but with |
Thank you for the solution :-) |
|
suddenly at 16.4.5...
|
Apaguei a pasta node_modules depois apaguei pasta onde estava os arquivos com esse error e depois instalei npm install typescript --save-dev , depois refiz os arquivos ai voltou ao normal , também é bom da um reload no vscode . |
I'me getting the following error when trying to run
npm run build
:Related issues
[REQUIRED] Version info
node:
v8.12.0
firebase-functions:
2.2.0 (same error with 2.1.0)
firebase-tools:
6.3.1
firebase-admin:
7.0.0
[REQUIRED] Steps to reproduce
Create an empty firebase TypeScript project and try to compile.
Here's my
package.json
:The text was updated successfully, but these errors were encountered: