Skip to content

Commit

Permalink
chore: remove duplicate dep (OneKeyHQ#823)
Browse files Browse the repository at this point in the history
  • Loading branch information
loatheb authored Jun 2, 2022
1 parent 933ddfd commit 7296fbb
Show file tree
Hide file tree
Showing 7 changed files with 253 additions and 176 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ We really need your support, star or watch this repo for latest updates.
## 🚀 Getting Onboard

1. Install [node.js LTS version (>= 16)](https://nodejs.org/en/)
2. Install [yarn package management tool](https://yarnpkg.com/)
2. Install [yarn package management tool](https://yarnpkg.com/)(After installing the latest version of yarn, execute `yarn policies set-version 1.18.0` in the root directory)
3. Install [git lfs](https://git-lfs.github.com/) (some binaries are required for pulling and updating)
4. To start the iOS project, make sure that the local XCode version is greater than or equal to 13.3
5. To start the Android project, make sure that the local JDK version is greater than or equal to 11

After pulling the latest code via the git command line tool, install the project dependencies in the root directory via the `yarn` command

Expand All @@ -59,6 +61,7 @@ Execute the following commands in the root directory to develop different busine
- `yarn ios`: connect to iphone device via USB for development debugging
- `yarn android`: develop android
- `yarn desktop`: development in desktop mode
- `yarn ext`: development in extension mode

## 🗂 Multi-repository directory structure

Expand All @@ -69,7 +72,7 @@ The repositories are organized using the monorepo model to keep the code on diff
- `packages/app` APP code
- `packages/desktop` Desktop electron code
- `packages/web` web-side code
- `packages/extension` Plugin-side code
- `packages/ext` chrome extension & firefox addon code

## 🧲 Install dependencies

Expand All @@ -83,7 +86,11 @@ Some of the dependencies have native parts, so you need to go into the `packages

1. The app does not start

Clear the packaging tool cache with the `--reset-cache` command in `yarn native` in the root directory. Also run `yarn clean` in the root directory to clear all dependencies and generated files and then re-run `yarn` to install the dependencies.
For any environment, module and dependency issues in the startup phase, it is recommended to use the command `yarn clean` in the root directory first. The command will clear all sub-dependencies, as well as the module cache of yarn, the cache of tools such as metro / babel, and then restart the project to try.

2. During the installation of dependencies or when adding new dependencies, yarn will prompt **error An unexpected error occurred: "expected workspace package to exist for**

Refer to https://github.com/yarnpkg/yarn/issues/7807, set the current environment yarn version to 1.18.0 through the command `yarn policies set-version 1.18.0`

## 💬 Docs in your languages
| Available Languages |
Expand Down
17 changes: 12 additions & 5 deletions docs/i18n/README.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
1. installieren Sie [node.js LTS Version (>= 16)](https://nodejs.org/en/)
2. Installieren Sie das [yarn package management tool](https://yarnpkg.com/)
3. installieren Sie [git lfs](https://git-lfs.github.com/) (erforderlich für das Ziehen und Aktualisieren einiger Binärdateien)
4. Stellen Sie zum Starten des iOS-Projekts sicher, dass die lokale XCode-Version größer oder gleich 13.3 ist
5. Um das Android-Projekt zu starten, stellen Sie sicher, dass die lokale JDK-Version größer oder gleich 11 ist

Nachdem Sie den neuesten Code über das Git-Kommandozeilen-Tool geholt haben, installieren Sie die Projektabhängigkeiten im Hauptverzeichnis mit dem Befehl ``yarn``

Expand All @@ -25,6 +27,7 @@ Entwickeln Sie verschiedene Geschäftscodes, indem Sie die folgenden Befehle im
- yarn ios": Debugging-Entwicklung auf iphone-Geräten über USB-Verbindung
- yarn android": Fehlersuche für Android
- yarn desktop": Entwicklung im Desktop-Modus
- `yarn ext`: Entwicklung von Browser-Plugins

### Android-Projektkonfiguration

Expand All @@ -44,9 +47,9 @@ Die Repositories sind nach dem Monorepo-Modell organisiert, um den Code auf vers
- Pakete/Komponenten" für UI-Komponenten
- packages/kit" enthält wiederverwendbare UI-Inhalte auf Seitenebene
- packages/app` APP-Code
- Pakete/Desktop" Desktop-Elektronencode
- Pakete/Web" Webseitiger Code
- Packages/Erweiterung" Plugin-seitiger Code
- Pakete/desktop" Desktop-Elektronencode
- Pakete/web" Webseitiger Code
- Packages/ext" Plugin-seitiger Code

## 🧲 Abhängigkeiten installieren

Expand All @@ -58,6 +61,10 @@ Einige der Abhängigkeiten haben native Teile, daher müssen Sie in das Verzeich

## 😷 Häufig gestellte Fragen

1. die App startet nicht
1. Die App kann nicht gestartet werden und verschiedene Umgebungsstartprobleme

Löschen Sie den Cache des Paketierungswerkzeugs mit dem Befehl `--reset-cache` in `yarn native` im Stammverzeichnis. Verwenden Sie auch den Befehl `-yarn clean` im Hauptverzeichnis, um alle Abhängigkeiten und erzeugten Dateien zu löschen und führen Sie dann `-yarn` erneut aus, um die Abhängigkeiten zu installieren.
Bei allen Umgebungs-, Modul- und Abhängigkeitsproblemen in der Startphase wird empfohlen, zuerst den Befehl "yarn clean" im Stammverzeichnis zu verwenden. Der Befehl löscht alle untergeordneten Abhängigkeiten sowie den Modul-Cache von Garn, den Cache von Tools wie Metro / Babel und startet dann das Projekt neu, um es zu versuchen.

2. Während der Installation von Abhängigkeiten oder beim Hinzufügen neuer Abhängigkeiten zeigt Garn **Fehler an. Ein unerwarteter Fehler ist aufgetreten: "expected workspace package to exist for**

Siehe https://github.com/yarnpkg/yarn/issues/7807, setzen Sie die aktuelle Garnversion der Umgebung auf 1.18.0 durch den Befehl „yarn policies set-version 1.18.0“.
15 changes: 11 additions & 4 deletions docs/i18n/README.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
## 🌍 Configuration de l'environnement

1. installer [node.js LTS version (>= 16)](https://nodejs.org/en/)
2. installez l'[outil de gestion des paquets yarn](https://yarnpkg.com/)
2. Installez [l'outil de gestion des packages de fils](https://yarnpkg.com/) version 1.18.0. (Après avoir installé la dernière version de yarn, exécutez `yarn Policies set-version 1.18.0` dans le répertoire racine)
3. installer [git lfs](https://git-lfs.github.com/) (nécessaire pour tirer et mettre à jour certains binaires)
4. Pour démarrer le projet iOS, assurez-vous que la version locale de XCode est supérieure ou égale à 13.3
5. Pour démarrer le projet Android, assurez-vous que la version locale du JDK est supérieure ou égale à 11

Après avoir récupéré le dernier code via l'outil en ligne de commande git, installez les dépendances du projet dans le répertoire racine avec la commande ``yarn``.

Expand All @@ -25,6 +27,7 @@ Développez un code commercial différent en exécutant les commandes suivantes
- `yarn ios` : déboguer le développement sur les appareils iphone via une connexion USB
- `yarn android` : déboguer Android
- `yarn desktop` : développement en mode desktop
- `yarn ext` : développer des plugins de navigateur

### Configuration du projet Android

Expand All @@ -46,7 +49,7 @@ Les dépôts sont organisés selon le modèle monorepo afin de centraliser et de
- `packages/app` Code APP
- `packages/desktop` Code électronique du bureau
- `packages/web` code côté web
- `packages/extension` Code côté plugin
- `packages/ext` Code côté plugin

## 🧲 Installer les dépendances

Expand All @@ -58,6 +61,10 @@ Certaines des dépendances ont des parties natives, vous devrez donc aller dans

## 😷 Questions fréquemment posées

1. l'application ne démarre pas
1. L'application ne peut pas être démarrée et divers problèmes de démarrage de l'environnement

Videz le cache de l'outil de packaging avec la commande `--reset-cache` dans `yarn native` dans le répertoire racine. Utilisez également la commande `-yarn clean` dans le répertoire racine pour effacer toutes les dépendances et les fichiers générés, puis relancez `-yarn` pour installer les dépendances.
Pour tout problème d'environnement, de module et de dépendance dans la phase de démarrage, il est recommandé d'utiliser d'abord la commande `yarn clean` dans le répertoire racine. La commande effacera toutes les sous-dépendances, ainsi que le cache du module de yarn, le cache des outils tels que metro/babel, puis redémarrera le projet pour essayer.

2. Lors de l'installation de dépendances ou lors de l'ajout de nouvelles dépendances, yarn affichera **error Une erreur inattendue s'est produite : "le package d'espace de travail attendu existe pour**

Reportez-vous à https://github.com/yarnpkg/yarn/issues/7807, définissez la version actuelle du fil de l'environnement sur 1.18.0 via la commande `yarn Policies set-version 1.18.0`
15 changes: 11 additions & 4 deletions docs/i18n/README.it.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
## 🌍 Configurazione dell'ambiente

1. installare [node.js versione LTS (>= 16)](https://nodejs.org/en/)
2. installare lo [strumento di gestione dei pacchetti yarn](https://yarnpkg.com/)
2. Installare lo [strumento di gestione dei pacchetti di filati](https://yarnpkg.com/) versione 1.18.0. (Dopo aver installato l'ultima versione di yarn, esegui `yarn policies set-version 1.18.0` nella directory principale)
3. installare [git lfs](https://git-lfs.github.com/) (necessario per tirare e aggiornare alcuni binari)
4. Per avviare il progetto iOS, assicurati che la versione locale di XCode sia maggiore o uguale a 13.3
5. Per avviare il progetto Android, assicurati che la versione JDK locale sia maggiore o uguale a 11

Dopo aver prelevato l'ultimo codice tramite lo strumento a riga di comando git, installare le dipendenze del progetto nella directory principale con il comando ``yarn``

Expand All @@ -25,6 +27,7 @@ Sviluppare codice commerciale diverso eseguendo i seguenti comandi nella directo
- `yarn ios`: debug dello sviluppo su dispositivi iphone tramite connessione USB
- `yarn android`: debug di Android
- `yarn desktop`: sviluppo in modalità desktop
- `yarn ext`: sviluppa plugin per browser

### Configurazione del progetto Android

Expand All @@ -46,7 +49,7 @@ I repository sono organizzati utilizzando il modello monorepo per mantenere il c
- `packages/app` codice APP
- `packages/desktop` Codice elettronico del desktop
- `pacchetti/web` codice lato web
- `pacchetti/estensione` Codice lato plugin
- `pacchetti/ext` Codice lato plugin

## 🧲 Installare le dipendenze

Expand All @@ -58,6 +61,10 @@ Alcune delle dipendenze hanno parti native, quindi dovrai andare nella directory

## 😷 Domande frequenti

1. L'applicazione non si avvia
1. L'app non può essere avviata e vari problemi di avvio dell'ambiente

Cancellare la cache dello strumento di packaging con il comando `--reset-cache` in `yarn native` nella directory principale. Usa anche il comando `-yarn clean` nella directory principale per cancellare tutte le dipendenze e i file generati e poi esegui nuovamente `-yarn` per installare le dipendenze.
Per qualsiasi problema relativo all'ambiente, ai moduli e alle dipendenze nella fase di avvio, si consiglia di utilizzare prima il comando `yarn clean` nella directory principale. Il comando cancellerà tutte le sotto-dipendenze, così come la cache del modulo di yarn, la cache di strumenti come metro/babel, e quindi riavvierà il progetto per provare.

2. Durante l'installazione delle dipendenze o quando si aggiungono nuove dipendenze, il filato visualizzerà **errore Si è verificato un errore imprevisto: "prevista l'esistenza del pacchetto dell'area di lavoro per**

Fare riferimento a https://github.com/yarnpkg/yarn/issues/7807, impostare la versione corrente del filato dell'ambiente su 1.18.0 tramite il comando `yarn policies set-version 1.18.0`
25 changes: 16 additions & 9 deletions docs/i18n/README.jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
## 🌍 環境設定

1. [node.js LTS バージョン (>= 16)] をインストールする(https://nodejs.org/en/)
2. [yarnパッケージ管理ツール](https://yarnpkg.com/)をインストールします。
2. [yarnパッケージ管理ツール]https://yarnpkg.com/)バージョン1.18.0をインストールします。 (最新バージョンのyarnをインストールした後、ルートディレクトリで `yarn policy set-version 1.18.0`を実行します)
3. インストール [git lfs](https://git-lfs.github.com/) (いくつかのバイナリのプルおよびアップデートに必要)
4. iOSプロジェクトを開始するには、ローカルXCodeバージョンが13.3以上であることを確認してください
5. Androidプロジェクトを開始するには、ローカルJDKバージョンが11以上であることを確認してください

git コマンドラインツールで最新のコードを取得した後、プロジェクトの依存関係を ``yarn`` コマンドでルートディレクトリにインストールします。

Expand All @@ -25,6 +27,7 @@ npm install -g expo-cli
- yarn ios`: USB接続でiphoneデバイスの開発をデバッグする。
- `yarn android`: Androidのデバッグ
- `yarn desktop`: デスクトップモードでの開発
- `yarn ext`:ブラウザプラグインを開発します

### Androidプロジェクトの構成

Expand All @@ -41,12 +44,12 @@ npm install -g expo-cli

リポジトリはmonorepoモデルで構成され、異なるエンドのコードを一元化して影響を受けないようにするとともに、パッケージングとコンパイルの過程で可能な限りコードの再利用を可能にします。

- UI コンポーネントのための `packages/components`
- packages/kit` は、再利用可能なページレベルのUIコンテンツを保持します。
- パッケージ/アプリ` APPコード
- packages/desktop` デスクトップ電子コード
- パッケージ/web` ウェブサイドのコード
- パッケージ/拡張機能` プラグイン側のコード
- `packages/components` はUIコンポーネントを保持します
- `packages/kit`再利用可能なページレベルのUIコンテンツ用の
- `packages /app`APPコード
- `packages/desktop`デスクトップの電子コード
- `packages /web`Webコード
- `packages/ext`プラグインサイドコード

## 🧲 依存関係をインストールする

Expand All @@ -58,6 +61,10 @@ packages/` ディレクトリの下のサブディレクトリはそれぞれ別

## 😷 よくある質問

1.アプリが起動しない
1.アプリを起動できず、さまざまな環境起動の問題

ルートディレクトリの `yarn native` にある `--reset-cache` コマンドで、パッケージングツールのキャッシュをクリアします。 また、ルートディレクトリで `-yarn clean` コマンドを使用して、すべての依存関係と生成されたファイルをクリアしてから、 `-yarn` を再実行すると依存関係がインストールされます。
起動フェーズでの環境、モジュール、および依存関係の問題については、最初にルートディレクトリでコマンド`yarnclean`を使用することをお勧めします。このコマンドは、すべてのサブ依存関係、yarnのモジュールキャッシュ、metro / babelなどのツールのキャッシュをクリアしてから、プロジェクトを再起動して試行します。

2.依存関係のインストール中、または新しい依存関係を追加するときに、yarnは**エラーをプロンプトします予期しないエラーが発生しました:"予期されたワークスペースパッケージが存在します**

https://github.com/yarnpkg/yarn/issues/7807、コマンド「yarnpolicyset-version1.18.0」を使用して現在の環境のyarnバージョンを1.18.0に設定します。
17 changes: 11 additions & 6 deletions docs/i18n/README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
## 🌍 环境配置

1. 安装 [node.js LTS 版本(>= 16)](https://nodejs.org/en/)
2. 安装 [yarn 包管理工具](https://yarnpkg.com/)
2. 安装 [yarn 包管理工具](https://yarnpkg.com/) 1.18.0 版本。(安装完成最新版本的 yarn 之后,根目录执行 `yarn policies set-version 1.18.0`
3. 安装 [git lfs](https://git-lfs.github.com/)(部分二进制文件在拉取和更新时需要)

通过 git 命令行工具拉取最新的代码之后,通过 `yarn` 命令在根目录安装项目依赖
4. 启动 iOS 项目需确保本地 XCode 版本大于等于 13.3
5. 启动 Android 项目需确保本地 JDK 版本大于等于 11

```
# 安装所有 JS 依赖及子模块依赖
Expand All @@ -25,6 +25,7 @@ npm install -g expo-cli
- `yarn ios`: 通过 USB 连接 iphone 设备进行开发调试
- `yarn android`: 调试安卓
- `yarn desktop`: 开发桌面端模式
- `yarn ext`: 开发浏览器插件

### Android 项目配置

Expand All @@ -46,7 +47,7 @@ npm install -g expo-cli
- `packages/app` APP 代码
- `packages/desktop` 桌面端 electron 代码
- `packages/web` 网页端代码
- `packages/extension` 插件端代码
- `packages/ext` 插件端代码

## 🧲 安装依赖

Expand All @@ -58,6 +59,10 @@ npm install -g expo-cli

## 😷 常见问题

1. app 无法启动
1. app 无法启动及各类环境启动问题

任何启动阶段的环境,模块及依赖问题,都推荐先使用根目录下命令 `yarn clean`。命令中会清除所有子依赖,同时清除 yarn 的模块缓存,metro / babel 等工具缓存,之后重新启动项目尝试。

2. yarn 安装依赖过程中或新增依赖时,提示 **error An unexpected error occurred: "expected workspace package to exist for**

通过根目录下的 `yarn native``--reset-cache` 命令清除打包工具缓存。同时配合根目录下命令 `yarn clean` 清除所有依赖及生成文件后重新执行 `yarn` 安装依赖。
参考 https://github.com/yarnpkg/yarn/issues/7807,通过命令 `yarn policies set-version 1.18.0` 设置当前环境 yarn 版本为 1.18.0
Loading

0 comments on commit 7296fbb

Please sign in to comment.