From eb90601304fa04e11efaebbcd4408d41a88c61e6 Mon Sep 17 00:00:00 2001 From: Kadi Kraman Date: Sun, 18 Aug 2024 12:30:07 +0100 Subject: [PATCH 1/2] Use npx expo install --- packages/realm/README.md | 2 +- packages/realm/src/platform/react-native/expo-go-detection.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/realm/README.md b/packages/realm/README.md index 72720f949d..828dca232d 100644 --- a/packages/realm/README.md +++ b/packages/realm/README.md @@ -134,7 +134,7 @@ If you are using Expo, a common pitfall is not installing the `expo-dev-client` - install the `expo-dev-client`: ``` - npm install expo-dev-client + npx expo install expo-dev-client ``` - build the dev client for iOS ``` diff --git a/packages/realm/src/platform/react-native/expo-go-detection.ts b/packages/realm/src/platform/react-native/expo-go-detection.ts index ec1241fdbf..104cd1dbb0 100644 --- a/packages/realm/src/platform/react-native/expo-go-detection.ts +++ b/packages/realm/src/platform/react-native/expo-go-detection.ts @@ -31,7 +31,7 @@ export class RealmInExpoGoError extends Error { constructor() { const runCommand = `npx expo run:${Platform.OS}`; super( - `'realm' was imported from the Expo Go app, but unfortunately Expo Go doesn't contain the native module for the 'realm' package - consider using an Expo development build instead:\n\nnpm install expo-dev-client\n${runCommand}\n\nRead more: https://docs.expo.dev/develop/development-builds/introduction/`, + `'realm' was imported from the Expo Go app, but unfortunately Expo Go doesn't contain the native module for the 'realm' package - consider using an Expo development build instead:\n\nnpx expo install expo-dev-client\n${runCommand}\n\nRead more: https://docs.expo.dev/develop/development-builds/introduction/`, ); } } From cca8635a59e349d19474bfc5437830a5ebbfca9c Mon Sep 17 00:00:00 2001 From: Kadi Kraman Date: Sun, 18 Aug 2024 12:32:08 +0100 Subject: [PATCH 2/2] Update expo go instruction --- packages/realm/src/platform/react-native/expo-go-detection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/realm/src/platform/react-native/expo-go-detection.ts b/packages/realm/src/platform/react-native/expo-go-detection.ts index 104cd1dbb0..82612cd97c 100644 --- a/packages/realm/src/platform/react-native/expo-go-detection.ts +++ b/packages/realm/src/platform/react-native/expo-go-detection.ts @@ -31,7 +31,7 @@ export class RealmInExpoGoError extends Error { constructor() { const runCommand = `npx expo run:${Platform.OS}`; super( - `'realm' was imported from the Expo Go app, but unfortunately Expo Go doesn't contain the native module for the 'realm' package - consider using an Expo development build instead:\n\nnpx expo install expo-dev-client\n${runCommand}\n\nRead more: https://docs.expo.dev/develop/development-builds/introduction/`, + `Expo Go does not contain the native module for the 'realm' package. To use native modules outside of what is packaged in Expo Go, create a development build:\n\nnpx expo install expo-dev-client\n${runCommand}\n\nRead more: https://docs.expo.dev/develop/development-builds/introduction/`, ); } }