Can't Connect to Server Without Running Locally #7733
-
I was able to successfully install. However, I have only been able to get successful responses from my Firebase functions when running the emulator or shell. "serve": "npm run build && firebase emulators:start",
"shell": "npm run build && firebase functions:shell", I'm confused about why I need to be running anything locally in order to access Functions that have been deployed. I suspect I'm misunderstanding how this is intended to be used. As things stand now, this won't run on a physical device, since it needs a local server running. The instructions for using the emulator have no effect on whether the remote or emulator version of Firestore is updated. Adding or removing the code below has no effect. That depends solely on which npm command I run: if (__DEV__) {
firestore().useEmulator('localhost', 8080);
} I'm only using I'm initializing an app in my Functions as well. However, I believe this is a common approach. Here is how I initialize my app and reference the Firestore within my Functions. import {getFirestore} from "firebase-admin/firestore";
import {initializeApp} from "firebase-admin/app";
initializeApp();
const db = getFirestore();
export default db; I have added the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I was able to resolve it by repeating the iOS installation steps. I originally ran |
Beta Was this translation helpful? Give feedback.
I was able to resolve it by repeating the iOS installation steps. I originally ran
npm run ios
. This time I rannpx react-native run-ios
. I'm not sure if that makes a difference.