Skip to content

修复:声明 Shiki 语言与主题依赖 - #19

Open
hifizz wants to merge 1 commit into
mainfrom
codex/vercel
Open

修复:声明 Shiki 语言与主题依赖#19
hifizz wants to merge 1 commit into
mainfrom
codex/vercel

Conversation

@hifizz

@hifizz hifizz commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Motivation

  • 修复 Vercel/Turbopack 构建中无法解析 Shiki 子路径(例如 @shikijs/langs/bash)的错误,原因是这些子包未作为项目的直接依赖暴露给严格的安装环境。

Description

  • package.json 中将 @shikijs/langs@shikijs/themes 声明为生产依赖并固定为 4.3.1,同时在 pnpm-lock.yaml 的 importer 列表中添加对应条目以确保严格安装时子路径可解析。

Testing

  • 运行 pnpm install --offline --frozen-lockfile,安装并识别出 @shikijs/langs@4.3.1@shikijs/themes@4.3.1(成功)。
  • 运行 pnpm typechecktsc --noEmit)检查类型(成功)。
  • 运行 node -e "Promise.all([import('@shikijs/langs/bash'), import('@shikijs/themes/vitesse-light')])..." 验证子路径动态导入(成功,子路径解析通过)。
  • 运行 git diff --check 验证无格式/检查错误(成功)。
  • 运行 pnpm lint 显示项目中存在与本次依赖更改无关的若干 React Hooks lint 错误(失败,问题为现有代码质量问题而非本次变更)。
  • 运行 pnpm build 时 Turbopack 已不再报 Shiki 相关的模块缺失错误,但构建在尝试从 fonts.googleapis.com 拉取 Google Fonts(Inter / Geist Mono)时因环境无法访问外部网络而失败(构建未通过,原因为网络字体下载失败,与 Shiki 子路径问题已无关)。

Codex Task

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
thread-chatbot Error Error Jul 29, 2026 3:57pm

@cr-gpt

cr-gpt Bot commented Jul 29, 2026

Copy link
Copy Markdown

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant