如何让 `Cloud Functions shell` 与 Firestore 一起工作

How to get `Cloud Functions shell` work with Firestore

运行:

firebase experimental:functions:shell

当我尝试像这样调用我的函数时:

sendEmail('data', {params: 'commentId:12'})

我得到:

Info: Function crashed TypeError: Cannot use 'in' operator to search for 'exists' in data

如何在 Firestore 触发的云函数上启动新的 onWrite

版本 3.15.1 of the Firebase CLI, you can now run Firestore functions locally.