From 8a2b462b065019cac888ddd18262949bdf370101 Mon Sep 17 00:00:00 2001 From: simeng-li Date: Thu, 23 Jan 2025 16:00:23 +0800 Subject: [PATCH] chore: update expo SDK content (#972) * chore: update expo SDK content update expo SDK integration content * feat: add i18n updates add i18n updates --- docs/quick-starts/framework/expo/README.mdx | 7 +++++++ .../current/quick-starts/framework/expo/README.mdx | 7 +++++++ .../current/quick-starts/framework/expo/README.mdx | 9 ++++++++- .../current/quick-starts/framework/expo/README.mdx | 7 +++++++ .../current/quick-starts/framework/expo/README.mdx | 13 ++++++++++--- .../current/quick-starts/framework/expo/README.mdx | 9 ++++++++- .../current/quick-starts/framework/expo/README.mdx | 9 ++++++++- 7 files changed, 55 insertions(+), 6 deletions(-) diff --git a/docs/quick-starts/framework/expo/README.mdx b/docs/quick-starts/framework/expo/README.mdx index 7fc498032f0..d37d79df363 100644 --- a/docs/quick-starts/framework/expo/README.mdx +++ b/docs/quick-starts/framework/expo/README.mdx @@ -48,6 +48,13 @@ import GetUserInformation from './get-user-information/_index.mdx'; ### Unable to resolve `@logto/client/shim` \{#unable-to-resolve-logtoclientshim} +:::note + +- For users using the SDK version \<= v0.3.0, please follow the instructions below to resolve the issue. +- For users using the SDK version \>= v0.4.0, please ignore this section. This issue has been fixed in the latest version. + +::: + For Expo projects, if you encounter the error `Unable to resolve "@logto/client/shim" from "node_modules/@logto/rn/lib/index.js"`, you can resolve it by adding the following to your `metro.config.js` file: ```js title="metro.config.js" diff --git a/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx b/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx index 3efb1d27353..3d32df65e2b 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx +++ b/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx @@ -48,6 +48,13 @@ import GetUserInformation from './get-user-information/_index.mdx'; ### `@logto/client/shim` kann nicht aufgelöst werden \{#unable-to-resolve-logtoclientshim} +:::note + +- Für Benutzer, die die SDK-Version \<= v0.3.0 verwenden, befolge bitte die untenstehenden Anweisungen, um das Problem zu lösen. +- Für Benutzer, die die SDK-Version \>= v0.4.0 verwenden, ignoriere bitte diesen Abschnitt. Dieses Problem wurde in der neuesten Version behoben. + +::: + Für Expo-Projekte, wenn du auf den Fehler `Unable to resolve "@logto/client/shim" from "node_modules/@logto/rn/lib/index.js"` stößt, kannst du ihn beheben, indem du Folgendes zu deiner `metro.config.js`-Datei hinzufügst: ```js title="metro.config.js" diff --git a/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx b/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx index 958e9330d80..ff599ee52a0 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx +++ b/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx @@ -48,6 +48,13 @@ import GetUserInformation from './get-user-information/_index.mdx'; ### No se puede resolver `@logto/client/shim` \{#unable-to-resolve-logtoclientshim} +:::note + +- Para usuarios que utilizan la versión del SDK \<= v0.3.0, por favor sigue las instrucciones a continuación para resolver el problema. +- Para usuarios que utilizan la versión del SDK \>= v0.4.0, por favor ignora esta sección. Este problema ha sido solucionado en la última versión. + +::: + Para proyectos de Expo, si encuentras el error `Unable to resolve "@logto/client/shim" from "node_modules/@logto/rn/lib/index.js"`, puedes resolverlo añadiendo lo siguiente a tu archivo `metro.config.js`: ```js title="metro.config.js" @@ -63,7 +70,7 @@ module.exports = config; Este error indica que el paquete `@logto/rn` no puede resolver el módulo `@logto/client/shim`. -Como las exportaciones de nodo se usaron en el paquete `@logto/client`, y las exportaciones de paquetes no están habilitadas por defecto en el empaquetador Metro, necesitas habilitarlas manualmente. +Como las exportaciones de nodo se utilizaron en el paquete `@logto/client`, y las exportaciones de paquetes no están habilitadas por defecto en el empaquetador Metro, necesitas habilitarlas manualmente. Consulta el [soporte de exportaciones de paquetes de React Native](https://reactnative.dev/blog/2023/06/21/package-exports-support#enabling-package-exports-beta) para más detalles. diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx b/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx index 86332457017..3cd90cc7c30 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx +++ b/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx @@ -48,6 +48,13 @@ import GetUserInformation from './get-user-information/_index.mdx'; ### Impossible de résoudre `@logto/client/shim` \{#unable-to-resolve-logtoclientshim} +:::note + +- Pour les utilisateurs utilisant la version SDK \<= v0.3.0, veuillez suivre les instructions ci-dessous pour résoudre le problème. +- Pour les utilisateurs utilisant la version SDK \>= v0.4.0, veuillez ignorer cette section. Ce problème a été corrigé dans la dernière version. + +::: + Pour les projets Expo, si vous rencontrez l'erreur `Unable to resolve "@logto/client/shim" from "node_modules/@logto/rn/lib/index.js"`, vous pouvez la résoudre en ajoutant ce qui suit à votre fichier `metro.config.js` : ```js title="metro.config.js" diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx b/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx index 607f0779cb3..97850867516 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx +++ b/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx @@ -46,9 +46,16 @@ import GetUserInformation from './get-user-information/_index.mdx'; ## トラブルシューティング \{#troubleshooting} -### `@logto/client/shim` を解決できません \{#unable-to-resolve-logtoclientshim} +### `@logto/client/shim` を解決できない \{#unable-to-resolve-logtoclientshim} -Expo プロジェクトで `Unable to resolve "@logto/client/shim" from "node_modules/@logto/rn/lib/index.js"` というエラーが発生した場合は、次の内容を `metro.config.js` ファイルに追加することで解決できます: +:::note + +- SDK バージョン \<= v0.3.0 を使用しているユーザーは、以下の手順に従って問題を解決してください。 +- SDK バージョン \>= v0.4.0 を使用しているユーザーは、このセクションを無視してください。この問題は最新バージョンで修正されています。 + +::: + +Expo プロジェクトで `Unable to resolve "@logto/client/shim" from "node_modules/@logto/rn/lib/index.js"` というエラーが発生した場合、次の内容を `metro.config.js` ファイルに追加することで解決できます: ```js title="metro.config.js" const config = { @@ -65,7 +72,7 @@ module.exports = config; `@logto/client` パッケージでノードエクスポートが使用されており、Metro バンドラーではパッケージエクスポートがデフォルトで有効になっていないため、手動で有効にする必要があります。 -詳細については、[React Native パッケージエクスポートサポート](https://reactnative.dev/blog/2023/06/21/package-exports-support#enabling-package-exports-beta)を参照してください。 +詳細については、[React Native パッケージエクスポートサポート](https://reactnative.dev/blog/2023/06/21/package-exports-support#enabling-package-exports-beta) を参照してください。 ## さらなる読み物 \{#further-readings} diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx b/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx index e66087bf8db..5be282ebfc3 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx @@ -48,6 +48,13 @@ import GetUserInformation from './get-user-information/_index.mdx'; ### Incapaz de resolver `@logto/client/shim` \{#unable-to-resolve-logtoclientshim} +:::note + +- Para usuários usando a versão do SDK \<= v0.3.0, siga as instruções abaixo para resolver o problema. +- Para usuários usando a versão do SDK \>= v0.4.0, ignore esta seção. Este problema foi corrigido na versão mais recente. + +::: + Para projetos Expo, se você encontrar o erro `Unable to resolve "@logto/client/shim" from "node_modules/@logto/rn/lib/index.js"`, você pode resolvê-lo adicionando o seguinte ao seu arquivo `metro.config.js`: ```js title="metro.config.js" @@ -63,7 +70,7 @@ module.exports = config; Este erro indica que o pacote `@logto/rn` não consegue resolver o módulo `@logto/client/shim`. -Como as exportações de node foram usadas no pacote `@logto/client`, e as exportações de pacotes não são habilitadas por padrão no Metro bundler, você precisa habilitá-las manualmente. +Como as exportações de node foram usadas no pacote `@logto/client`, e as exportações de pacotes não são habilitadas por padrão no empacotador Metro, você precisa habilitá-las manualmente. Veja o [suporte a exportações de pacotes do React Native](https://reactnative.dev/blog/2023/06/21/package-exports-support#enabling-package-exports-beta) para mais detalhes. diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx index 0888bd2cee6..9641fcab05a 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/expo/README.mdx @@ -48,7 +48,14 @@ import GetUserInformation from './get-user-information/_index.mdx'; ### 无法解析 `@logto/client/shim` \{#unable-to-resolve-logtoclientshim} -对于 Expo 项目,如果你遇到错误 `Unable to resolve "@logto/client/shim" from "node_modules/@logto/rn/lib/index.js"`,你可以通过在 `metro.config.js` 文件中添加以下内容来解决: +:::note + +- 对于使用 SDK 版本 \<= v0.3.0 的用户,请按照以下说明解决问题。 +- 对于使用 SDK 版本 \>= v0.4.0 的用户,请忽略此部分。此问题已在最新版本中修复。 + +::: + +对于 Expo 项目,如果你遇到错误 `Unable to resolve "@logto/client/shim" from "node_modules/@logto/rn/lib/index.js"`,可以通过在 `metro.config.js` 文件中添加以下内容来解决: ```js title="metro.config.js" const config = {