From 2852e794a25c74b0c6e4405792c116a13ff14f68 Mon Sep 17 00:00:00 2001 From: engigu Date: Mon, 23 Mar 2026 22:54:54 +0800 Subject: [PATCH] fix: node path find error --- .github/workflows/deploy.yml | 6 +++--- internal/utils/mise.go | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 22b4dfe..8d9af74 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,9 +23,9 @@ jobs: # - base_type: alpine # base_tag: base-alpine # tag_suffix: "-alpine" - - base_type: debian13 - base_tag: base-debian13 - tag_suffix: "-debian13" + # - base_type: debian13 + # base_tag: base-debian13 + # tag_suffix: "-debian13" permissions: contents: read diff --git a/internal/utils/mise.go b/internal/utils/mise.go index d47cd3d..c128e93 100644 --- a/internal/utils/mise.go +++ b/internal/utils/mise.go @@ -23,7 +23,9 @@ func GetMiseNodePath(version string) string { if err == nil { nodeDir := strings.TrimSpace(string(out)) if nodeDir != "" { - nodePath := nodeDir + "/lib/node_modules" + // 采用双路径策略:lib/node_modules 是标准路径,lib 是某些环境(如 mise Docker)下的特殊路径 + // 通过冒号分隔,让 Node.js 按顺序搜索,保证最大兼容性 + nodePath := nodeDir + "/lib/node_modules:" + nodeDir + "/lib" nodePathCache.Store(version, nodePath) return nodePath }