firebase-tools: An unexpected error has occurred on deploy

Just making firebase --deploy as usual and got this error. Update to latest version of firebase-tools but still the same error. What could be wrong?

[debug] [2019-04-21T11:45:53.781Z] TypeError: Cannot read property 'match' of undefined
    at exports.getAppEngineLocation (/usr/local/lib/node_modules/firebase-tools/lib/functionsConfig.js:41:27)
    at module.exports (/usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/release.js:83:29)
    at _chain (/usr/local/lib/node_modules/firebase-tools/lib/deploy/index.js:22:40)
    at /usr/local/lib/node_modules/firebase-tools/lib/deploy/index.js:69:16
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:229:7)
[error] 
[error] Error: An unexpected error has occurred.

ps: I’m trying to move from Node 6 to Node 8

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 20 (7 by maintainers)

Most upvoted comments

worked for me after upgrading to 6.7.1, thank you guys!

I believe this is indeed the cause of the issue. We are validating a potential fix and think we know the cause, but if you want to work around this you can:

  1. Install an old version of the Firebase CLI npm install -g firebase-tools@6.6.0. Note you won’t be able to deploy scheduled functions this way.
  2. Go to the Database tab in the Firebase console and set up a Firestore database (this will likely create the missing location value).