最新消息: 电脑我帮您提供丰富的电脑知识,编程学习,软件下载,win7系统下载。

Firebase部署在tsc命令处返回错误

IT培训 admin 4浏览 0评论

Firebase部署在tsc命令处返回错误

我已经设置了Firebase项目来创建一些基本的Firebase函数。在项目中,我正在使用TypeScript

跟随Firebase official documentation,我创建了我的项目。

[最后一步firebase deploy --only functions使用tsc命令给出了错误。

$ firebase deploy --only functions

=== Deploying to ‘my-project’…

i  deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint

> functions@ lint /path/to/functions
> tslint --project tsconfig.json

Running command: npm --prefix "$RESOURCE_DIR" run build

> functions@ build /path/to/functions
> tsc

node_modules/firebase-functions/lib/function-builder.d.ts(60,95): error TS1005: ';' expected.
node_modules/firebase-functions/lib/function-builder.d.ts(60,96): error TS1003: Identifier expected.
node_modules/firebase-functions/lib/function-builder.d.ts(60,116): error TS1005: ';' expected.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! functions@ build: `tsc`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the functions@ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /some/path/.npm/_logs/2019-02-03T00_10_30_573Z-debug.log

Error: functions predeploy error: Command terminated with non-zero exit code2

Having trouble? Try firebase deploy --help

[似乎某些Firebase库代码未通过tsc编译/传输步骤。我正在寻找使该部署步骤通过的方法。

我已经遵循this GitHub issue给出的建议,其中包括:

  • --skipLibCheck添加到tsc命令
  • skipLibCheck添加到项目的生成的functions/tsconfig.json
  • isolateModules添加到functions/tsconfig.json
  • ./functions/node_modules/@types添加到typeRoots文件中的functions/tsconfig.json阵列中。
  • dom中将compilerOptions.lib添加到functions/tsconfig.json中>
  • 以上步骤均不适合我。

如何使我成功部署到Firebase?

我已经设置了Firebase项目来创建一些基本的Firebase函数。在项目中,我正在使用TypeScript在Firebase官方文档之后,我创建了项目。最后一步,...

回答如下:

遇到同样的问题,在将Typescript库升级到3.3.1版本并进行npm安装后,便能够进行部署。

Firebase部署在tsc命令处返回错误

我已经设置了Firebase项目来创建一些基本的Firebase函数。在项目中,我正在使用TypeScript

跟随Firebase official documentation,我创建了我的项目。

[最后一步firebase deploy --only functions使用tsc命令给出了错误。

$ firebase deploy --only functions

=== Deploying to ‘my-project’…

i  deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint

> functions@ lint /path/to/functions
> tslint --project tsconfig.json

Running command: npm --prefix "$RESOURCE_DIR" run build

> functions@ build /path/to/functions
> tsc

node_modules/firebase-functions/lib/function-builder.d.ts(60,95): error TS1005: ';' expected.
node_modules/firebase-functions/lib/function-builder.d.ts(60,96): error TS1003: Identifier expected.
node_modules/firebase-functions/lib/function-builder.d.ts(60,116): error TS1005: ';' expected.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! functions@ build: `tsc`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the functions@ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /some/path/.npm/_logs/2019-02-03T00_10_30_573Z-debug.log

Error: functions predeploy error: Command terminated with non-zero exit code2

Having trouble? Try firebase deploy --help

[似乎某些Firebase库代码未通过tsc编译/传输步骤。我正在寻找使该部署步骤通过的方法。

我已经遵循this GitHub issue给出的建议,其中包括:

  • --skipLibCheck添加到tsc命令
  • skipLibCheck添加到项目的生成的functions/tsconfig.json
  • isolateModules添加到functions/tsconfig.json
  • ./functions/node_modules/@types添加到typeRoots文件中的functions/tsconfig.json阵列中。
  • dom中将compilerOptions.lib添加到functions/tsconfig.json中>
  • 以上步骤均不适合我。

如何使我成功部署到Firebase?

我已经设置了Firebase项目来创建一些基本的Firebase函数。在项目中,我正在使用TypeScript在Firebase官方文档之后,我创建了项目。最后一步,...

回答如下:

遇到同样的问题,在将Typescript库升级到3.3.1版本并进行npm安装后,便能够进行部署。

发布评论

评论列表 (0)

  1. 暂无评论