【发布时间】:2021-10-23 10:20:31
【问题描述】:
我正在使用带有 Firebase 功能的打字稿。当我尝试在函数目录中使用npm run deploy 进行部署时。它抛出了太多的打字稿错误。
../../../../node_modules/@types/react/index.d.ts:3208:13 - error TS2717: Subsequent property declarations must have the same type. Property 'feFuncB' must be of type 'SVGProps<SVGFEFuncBElement>', but here has type 'SVGProps<SVGFEFuncBElement>'.
3208 feFuncB: React.SVGProps<SVGFEFuncBElement>;
~~~~~~~
../node_modules/@types/react/index.d.ts:3108:13
3108 feFuncB: React.SVGProps<SVGFEFuncBElement>;
~~~~~~~
'feFuncB' was also declared here.
../../../../node_modules/@types/react/index.d.ts:3209:13 - error TS2717: Subsequent property declarations must have the same type. Property 'feFuncG' must be of type 'SVGProps<SVGFEFuncGElement>', but here has type 'SVGProps<SVGFEFuncGElement>'.
3209 feFuncG: React.SVGProps<SVGFEFuncGElement>;
~~~~~~~
../node_modules/@types/react/index.d.ts:3109:13
3109 feFuncG: React.SVGProps<SVGFEFuncGElement>;
~~~~~~~
'feFuncG' was also declared here.
../../../../node_modules/@types/react/index.d.ts:3210:13 - error TS2717: Subsequent property declarations must have the same type. Property 'feFuncR' must be of type 'SVGProps<SVGFEFuncRElement>', but here has type 'SVGProps<SVGFEFuncRElement>'.
3210 feFuncR: React.SVGProps<SVGFEFuncRElement>;
~~~~~~~
../../../../node_modules/@types/react/index.d.ts:3222:13 - error TS2717: Subsequent property declarations must have the same type. Property 'filter' must be of type 'SVGProps<SVGFilterElement>', but here has type 'SVGProps<SVGFilterElement>'.
3222 filter: React.SVGProps<SVGFilterElement>;
tsconfig.json
"compilerOptions": {
"module": "commonjs",
"noImplicitReturns": true,
"noUnusedLocals": true,
"outDir": "lib",
"sourceMap": true,
"strict": true,
"target": "es2017"
},
"compileOnSave": true,
"include": [
"src"
]
}
似乎打字稿正在通过节点模块文件夹。
【问题讨论】:
-
请不要将文字发布为屏幕截图。而是发布实际文本(代码、错误消息、数据等)并使用 Stack Overflow 的工具来标记它们。
标签: javascript typescript firebase google-cloud-functions