the ‘functionsRegion’ method returns a value depending on whether it is under an emulator or live server.
If you ser your region somewhere, not default region (us-central1), you have to set a region when you call functions like this.
But if you call your localhost function, you have to rid of the region parameter, and call the function ‘useFunctionsEmulator’ before to call functions
useFunctionsEmulator is now deprecated in the latest version of Firebase SDK. Check the document.