Merge branch 'main' of https://github.com/tw93/Pake
This commit is contained in:
12
bin/builders/BaseBuilder.ts
vendored
12
bin/builders/BaseBuilder.ts
vendored
@@ -144,8 +144,12 @@ export default abstract class BaseBuilder {
|
|||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
// If installation times out and we haven't tried the mirror yet, retry with mirror
|
// If installation times out and we haven't tried the mirror yet, retry with mirror
|
||||||
if (error.message?.includes('timed out') && !usedMirror) {
|
if (error.message?.includes('timed out') && !usedMirror) {
|
||||||
spinner.fail(chalk.yellow('Installation timed out, retrying with CN mirror...'));
|
spinner.fail(
|
||||||
logger.info('✺ Retrying installation with CN mirror for better speed...');
|
chalk.yellow('Installation timed out, retrying with CN mirror...'),
|
||||||
|
);
|
||||||
|
logger.info(
|
||||||
|
'✺ Retrying installation with CN mirror for better speed...',
|
||||||
|
);
|
||||||
|
|
||||||
const retrySpinner = getSpinner('Retrying installation...');
|
const retrySpinner = getSpinner('Retrying installation...');
|
||||||
usedMirror = true;
|
usedMirror = true;
|
||||||
@@ -158,7 +162,9 @@ export default abstract class BaseBuilder {
|
|||||||
timeout,
|
timeout,
|
||||||
buildEnv,
|
buildEnv,
|
||||||
);
|
);
|
||||||
retrySpinner.succeed(chalk.green('Package installed with CN mirror!'));
|
retrySpinner.succeed(
|
||||||
|
chalk.green('Package installed with CN mirror!'),
|
||||||
|
);
|
||||||
} catch (retryError) {
|
} catch (retryError) {
|
||||||
retrySpinner.fail(chalk.red('Installation failed'));
|
retrySpinner.fail(chalk.red('Installation failed'));
|
||||||
throw retryError;
|
throw retryError;
|
||||||
|
|||||||
2
docs/faq.md
vendored
2
docs/faq.md
vendored
@@ -18,6 +18,7 @@ Error: Command timed out after 900000ms: "cd ... && pnpm install"
|
|||||||
**Why This Happens:**
|
**Why This Happens:**
|
||||||
|
|
||||||
First-time installation on Windows can be slow due to:
|
First-time installation on Windows can be slow due to:
|
||||||
|
|
||||||
- Native module compilation (requires Visual Studio Build Tools)
|
- Native module compilation (requires Visual Studio Build Tools)
|
||||||
- Large dependency downloads (Tauri, Rust toolchain)
|
- Large dependency downloads (Tauri, Rust toolchain)
|
||||||
- Windows Defender real-time scanning
|
- Windows Defender real-time scanning
|
||||||
@@ -49,6 +50,7 @@ pake https://github.com --name GitHub
|
|||||||
- Use a VPN or proxy if needed
|
- Use a VPN or proxy if needed
|
||||||
|
|
||||||
**Expected Time:**
|
**Expected Time:**
|
||||||
|
|
||||||
- First installation: 10-15 minutes on Windows
|
- First installation: 10-15 minutes on Windows
|
||||||
- Subsequent builds: Much faster (dependencies cached)
|
- Subsequent builds: Much faster (dependencies cached)
|
||||||
|
|
||||||
|
|||||||
2
docs/faq_CN.md
vendored
2
docs/faq_CN.md
vendored
@@ -18,6 +18,7 @@ Error: Command timed out after 900000ms: "cd ... && pnpm install"
|
|||||||
**原因分析:**
|
**原因分析:**
|
||||||
|
|
||||||
Windows 首次安装可能较慢,原因包括:
|
Windows 首次安装可能较慢,原因包括:
|
||||||
|
|
||||||
- 本地模块编译(需要 Visual Studio Build Tools)
|
- 本地模块编译(需要 Visual Studio Build Tools)
|
||||||
- 大量依赖下载(Tauri、Rust 工具链)
|
- 大量依赖下载(Tauri、Rust 工具链)
|
||||||
- Windows Defender 实时扫描
|
- Windows Defender 实时扫描
|
||||||
@@ -49,6 +50,7 @@ pake https://github.com --name GitHub
|
|||||||
- 必要时使用 VPN 或代理
|
- 必要时使用 VPN 或代理
|
||||||
|
|
||||||
**预期时间:**
|
**预期时间:**
|
||||||
|
|
||||||
- 首次安装:Windows 上需要 10-15 分钟
|
- 首次安装:Windows 上需要 10-15 分钟
|
||||||
- 后续构建:依赖已缓存,速度会快很多
|
- 后续构建:依赖已缓存,速度会快很多
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user