Error with firebase deploy --prefix $RESOURCE_DIR run lint giving functions/functions

14 Views Asked by At

I've been using Firebase for several years now and have recently set up a new project to run with Firebase.

The problem occurs when I try to run firebase deploy.

I get the errors:

[project root]/functions/.eslintrc.js

0:0 error Parsing error: Cannot read file '[project root]/functions/functions/tsconfig.json'

and

[project root]/functions/src/index.ts

0:0 error Parsing error: Cannot read file '[project root]/functions/functions/tsconfig.json'

I tried replacing

    "predeploy": [
      "npm --prefix "$RESOURCE_DIR" run lint",
      "npm --prefix "$RESOURCE_DIR" run build"
    ]
  }

with

    "predeploy": [
      "npm --prefix ./functions/ run lint",
      "npm --prefix ./functions/ run build"
    ]
  }

as per this answer https://stackoverflow.com/a/48591027/5348742,but I still get the same error.

If I checkout my previous commit, it works fine but using DIFF, I can't find any difference that could change the behaviour.

The firebase.json files are identical in the two versions.

0

There are 0 best solutions below