将Cloud Storage模块安装到Firebase Cloud Functions环境后,我立即收到以下构建错误:
node_modules/@google-cloud/common/build/src/service-object.d.ts(72,45): error TS8020: JSDoc types can only be used inside documentation comments.
node_modules/@google-cloud/common/build/src/service-object.d.ts(72,45): error TS8028: JSDoc '...' may only appear in the last parameter of a signature.
node_modules/@google-cloud/common/node_modules/google-auth-library/build/src/auth/oauth2client.d.ts(291,55): error TS1039: Initializers are not allowed in ambient contexts.
有人知道如何解决此问题吗?
答案 0 :(得分:3)
该问题似乎与已安装的Typescript版本^ 2及更低版本有关。升级到Typescript 3可以解决我的问题。
来源:https://github.com/firebase/firebase-functions/issues/341