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
问题描述
在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为我工作.我认为更高版本也可以.重要的是更新全局打字稿版本,因为我的本地打字稿版本更新不起作用
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屋!