Error: Cannot understand what targets to deploy. Check that you specified valid targets if you used the –only or –except flag. Otherwise, check your firebase.json to ensure that your project is initialized for the desired features.

どうやらfirebase-functionが新しくなったらしいので以下のコマンドで新しくした

1

$npm install--save firebase-functions@latest

そんで、デプロイしたあと動かしてみたらこんなエラーが出るようになってしまった。

TypeError: firestoreInstance.settings is not a function
at snapshotConstructor (/user_code/node_modules/firebase-functions/lib/providers/firestore.js:124:27)
at cloudFunctionNewSignature (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:108:28)
at cloudFunction (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:139:20)
at /var/tmp/worker/worker.js:730:24
at process._tickDomainCallback (internal/process/next_tick.js:135:7)