node_modules/firebase-functions/lib/function-configuration.d.ts:4:64 - error TS1005: ']' expected

后端 未结 4 1391
我在风中等你
我在风中等你 2020-12-06 18:45

I am getting the following error when executing the command firebase deploy --only function in my Ionic 3 project. This solution is not working for me.

4条回答
  •  广开言路
    2020-12-06 18:50

    Judging from the github issue that you linked and the error message itself, the error seems to be due to the new readonly tuples feature. It was introduced in typescript@3.4.0 so, in theory, any typescript version higher than that should work.

    In fact, firebase-functions@3.2.0 uses typescript@3.5.2 so I recommend you use the same or higher.


    That being said, I see that you have already used typescript@3.5.3 but the error still popped up.

    Version details:

    "angularfire2": "^5.2.1",
    "firebase": "^6.3.1",
    "firebase-admin": "^8.2.0",
    "firebase-functions": "3.2.0",
    "typescript": "^3.5.3"
    

    It may be because of a different (older) typescript version being used by some other package internally. Please check your package-lock.json (or yarn.lock) to confirm.

    If that's not the case, then my next best guess is that ionic-app-scripts is using older typescript internally.

提交回复
热议问题