Skip to content

Commit

Permalink
chore: update expo SDK content (#972)
Browse files Browse the repository at this point in the history
* chore: update expo SDK content

update expo SDK integration content

* feat: add i18n updates

add i18n updates
  • Loading branch information
simeng-li authored Jan 23, 2025
1 parent 9d1ac17 commit 8a2b462
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 6 deletions.
7 changes: 7 additions & 0 deletions docs/quick-starts/framework/expo/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 8a2b462

Please sign in to comment.