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.

error TS1005: ';' expected on tsc

See original GitHub issue

I’me getting the following error when trying to run npm run build:

node_modules/firebase-functions/lib/function-builder.d.ts(60,95): error TS1005: ';' expected.
node_modules/firebase-functions/lib/function-builder.d.ts(60,96): error TS1003: Identifier expected.
node_modules/firebase-functions/lib/function-builder.d.ts(60,116): error TS1005: ';' expected.
node_modules/gaxios/build/src/index.d.ts(14,66): error TS1005: '>' expected.
node_modules/gaxios/build/src/index.d.ts(14,103): error TS1109: Expression expected.

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:

{
  "name": "functions",
  "scripts": {
    "lint": "tslint --project tsconfig.json",
    "build": "tsc",
    "serve": "npm run build && firebase serve --only functions",
    "shell": "npm run build && firebase functions:shell",
    "start": "npm run shell",
    "deploy": "firebase deploy --only functions",
    "logs": "firebase functions:log"
  },
  "main": "lib/index.js",
  "dependencies": {
    "firebase-admin": "^7.0.0",
    "firebase-functions": "^2.2.0"
  },
  "devDependencies": {
    "tslint": "~5.8.0",
    "typescript": "~2.8.3"
  },
  "private": true
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:46 (9 by maintainers)

github_iconTop GitHub Comments

83reactions
agordeevcommented, Feb 4, 2019

npm install typescript --save-dev did the trick. Thanks!

31reactions
merlinnotcommented, Feb 3, 2019

Could you try to update TypeScript first?

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript error TS1005: ';' expected (II) - Stack Overflow
If you're getting error TS1005: 'finally' expected. , it means you forgot to implement catch after try . Generally, it means the syntax...
Read more >
TypeScript - expected ts 1005 | Edureka Community
I'm getting an error: ',' expected.ts(1005). The only answers I find say that typescript is out of date but I'm using 3.7.2
Read more >
Build SPFX@1.10.0 error - SharePoint Stack Exchange
[17:20:51] Error - [tsc] node_modules/antd/lib/_util/type.d.ts(8,83): error TS1005: '? ... error TS1128: Declaration or statement expected.
Read more >
Typescript – error TS1005: ';' expected - iTecNote
Your tsc is pointing to either an outdated global or local version of typescript. If you are running windows see if there is...
Read more >
import gives ts1005... lots of them - Microsoft Community Hub
ts(4,26): error TS1005: ';' expected. Error - typescript - node_modules/@uifabric/react-hooks/node_modules/@ ...
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