node_modules/firebase-functions/lib/function-configuration.d.ts:4:64 - 错误 TS1005: ']' 预期 [英] node_modules/firebase-functions/lib/function-configuration.d.ts:4:64 - error TS1005: ']' expected

查看:16
本文介绍了node_modules/firebase-functions/lib/function-configuration.d.ts:4:64 - 错误 TS1005: ']' 预期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 Ionic 3 项目中执行命令 firebase deploy --only function 时出现以下错误.此解决方案对我不起作用.

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.

Running command: npm --prefix "$RESOURCE_DIR" run build
> functions@ build /Users/myuser/Project/functions
> tsc

node_modules/firebase-functions/lib/function-configuration.d.ts:4:64 - error TS1005: ']' expected.
4 export declare const SUPPORTED_REGIONS: readonly ["us-central1", "us-east1", "us-east4", "europe-west1", "europe-west2", "asia-east2", "asia-northeast1"];
                                                                             ~

node_modules/firebase-functions/lib/function-configuration.d.ts:4:66 - error TS1134: Variable declaration expected.
4 export declare const SUPPORTED_REGIONS: readonly ["us-central1", "us-east1", "us-east4", "europe-west1", "europe-west2", "asia-east2", "asia-northeast1"];
                                                                   ~~~~~~~~~~

node_modules/firebase-functions/lib/function-configuration.d.ts:4:153 - error TS1005: ';' expected.
4 export declare const SUPPORTED_REGIONS: readonly ["us-central1", "us-east1", "us-east4", "europe-west1", "europe-west2", "asia-east2", "asia-northeast1"];
                                                                                                                                                          ~

node_modules/firebase-functions/lib/function-configuration.d.ts:16:61 - error TS1005: ']' expected.
16 export declare const VALID_MEMORY_OPTIONS: readonly ["128MB", "256MB", "512MB", "1GB", "2GB"];
                                                               ~

node_modules/firebase-functions/lib/function-configuration.d.ts:16:63 - error TS1134: Variable declaration expected.
16 export declare const VALID_MEMORY_OPTIONS: readonly ["128MB", "256MB", "512MB", "1GB", "2GB"];
                                                                 ~~~~~~~

node_modules/firebase-functions/lib/function-configuration.d.ts:16:93 - error TS1005: ';' expected.
16 export declare const VALID_MEMORY_OPTIONS: readonly ["128MB", "256MB", "512MB", "1GB", "2GB"];
                                                                                               ~

当我查看文件 node_modules/firebase-functions/lib/function-configuration.d.ts 时,它显示语法错误.

When I look into file node_modules/firebase-functions/lib/function-configuration.d.ts, it shows the syntax errors.

版本详情:

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

推荐答案

npm install -g typescript@3.5.3 为我工作.我认为更高版本也可以.更新全局 typescript 版本很重要,因为我的本地 typescript 版本更新不起作用

npm install -g typescript@3.5.3 worked for me. I assume higher versions would work as well. It is important to update the global typescript version as my local typescript version update didn't work

这篇关于node_modules/firebase-functions/lib/function-configuration.d.ts:4:64 - 错误 TS1005: ']' 预期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆