使用CircleCi包含Firebase函数将Typescript Gatsby项目部署到Firebase

时间:2020-08-31 23:13:23

标签: firebase gatsby circleci

在遵循CircleCI指南here之后,我只能部署,除非我部署托管

   - run:
       name: Firebase Deploy
       command: ./node_modules/.bin/firebase deploy --only hosting --token "$FIREBASE_TOKEN"

以下操作失败,因为我有一个带功能的子文件夹。 CircleCI无法看到该文件夹​​(该指南也没有介绍这种情况):

  - run:
      name: Firebase Deploy
      command: ./node_modules/.bin/firebase deploy --token "$FIREBASE_TOKEN"

这是日志:

=== Deploying to '***********************'...

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

> functions@ lint /home/circleci/gatsby-site/functions
> tslint --project tsconfig.json

sh: 1: tslint: not found

我理解为什么-由于它没有在功能子文件夹中运行npm install,因此tslint不存在。

如何让CircleCI来部署功能以及托管的盖茨比站点?

根据this,看来您只能有一个工作目录,而您的项目必须位于根目录中。由于函数不在根目录中(并且显然不能,因为函数具有自己的node_modules),这似乎是CATCH-22?!

0 个答案:

没有答案