The firebase extension for a distributed counter can be directly installed for the cloud and works just fine. To develop new features for an app I need to do this on the emulator to not interrupt the running server.
As the firebase extensions simply are cloud Functions*, I thought about implementing the cloud function in my emulator by getting the source code from the extension itself. This worked fine for other extentions so far...
Error and Disfunction when implementing
When implementing the javaScript version that i get the following error:
function ignored because the unknown emulator does not exist or is not running.
This problem can be fixed by rewriting the export line of the index.js
functions, but is wont provide the expected functionality of the extension anyhow:
exports.worker = functions.handler.firestore.document.onWrite(async (change, context) => {...});
to
exports.worker = functions.firestore.document("").onWrite(async (change, context) => {...});
Question
Am i missing some implementaion or is an emulator missing? How can i implement this firestore extention?
There are some similar questions, but dont really talk about the implementation of the whole extension: