Skip to content

fix(build): failed to make build-all-web - #6210

Closed
wangshibiaoFlytiger wants to merge 1 commit into
QuantumNous:mainfrom
aihubkit-labs:fix/build_web
Closed

fix(build): failed to make build-all-web#6210
wangshibiaoFlytiger wants to merge 1 commit into
QuantumNous:mainfrom
aihubkit-labs:fix/build_web

Conversation

@wangshibiaoFlytiger

@wangshibiaoFlytiger wangshibiaoFlytiger commented Jul 14, 2026

Copy link
Copy Markdown

📝 变更描述 / Description

修复 make build-all-web 在 Classic Web 构建阶段的依赖解析错误:

Rsbuild v2.1.4

info    build started...
error   Build errors: 
File: ../node_modules/date-fns-tz/format/index.js:8:45-71
  × Package subpath './format/index.js' is not defined by "exports" in /Users/wangshibiao/data/code/aihubkit/zmodel/web/node_modules/date-fns/package.json
Import traces (entry → error):
  ./src/index.jsx
  ./src/components/layout/PageLayout.jsx
  ... (5 hidden)
  ../node_modules/date-fns-tz/index.js
  ../node_modules/date-fns-tz/format/index.js ×

File: ../node_modules/date-fns-tz/formatInTimeZone/index.js:8:45-81
  × Package subpath './_lib/cloneObject/index.js' is not defined by "exports" in /Users/wangshibiao/data/code/aihubkit/zmodel/web/node_modules/date-fns/package.json

@douyinfe/semi-ui@2.99.3 使用的 date-fns-tz@1.3.8 依赖 date-fns@2 的内部模块路径,而 workspace 默认提升了 date-fns@4。由于 date-fns@4 通过 exports 限制了这些
内部路径,Rspack 无法完成模块解析。

本次为 Classic Web 显式固定 date-fns@2.30.0date-fns-tz@1.3.8,并在 Rsbuild 中指定对应依赖的解析路径。同时保留 Default Web 所需的 date-fns@4.4.0,避免影响另一套
前端的现有依赖。

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix)
  • ✨ 新功能 (New feature)
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

🔗 关联任务 / Related Issue

  • 无关联 Issue

✅ 提交前检查项 / Checklist

  • 人工确认: 我已亲自整理并撰写此描述,没有直接粘贴未经处理的 AI 输出。
  • 非重复提交: 我已搜索现有的 Issues 与 PRs,确认不是重复提交。
  • Bug fix 说明: 此 PR 修复的是实际存在的构建失败问题,不涉及设计取舍、理解偏差或预期不一致。
  • 变更理解: 我已理解这些更改的工作原理及可能影响。
  • 范围聚焦: 本 PR 未包含任何与当前任务无关的代码改动。
  • 本地验证: 已在本地运行并通过构建验证,维护者可以据此复核结果。
  • 安全合规: 代码中无敏感凭据,且符合项目代码规范。

📸 运行证明 / Proof of Work

已在本地执行:

make build-all-web

验证结果:

Building default web...
ready   built in 4.80s

Building classic web...
ready   built in 2.73s

make 返回码:0

Default Web 和 Classic Web 均构建成功,原先的:

Package subpath ... is not defined by "exports"

错误已不再出现。

同时执行:

git diff --check

检查通过。

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Improvements**
- Enhanced date and time support in the Classic web experience.
- Improved compatibility and reliability for date-related features across supported environments.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b3fe91a6-27c7-4493-8bc1-f530e17b6506

📥 Commits

Reviewing files that changed from the base of the PR and between a63364d and 7eeae93.

⛔ Files ignored due to path filters (1)
  • web/bun.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • web/classic/package.json
  • web/classic/rsbuild.config.ts

Walkthrough

The classic frontend adds date-fns and date-fns-tz dependencies and configures Rsbuild aliases to resolve both packages from their installed directories.

Changes

Classic date resolution

Layer / File(s) Summary
Dependency and bundler resolution
web/classic/package.json, web/classic/rsbuild.config.ts
Adds date-fns and date-fns-tz, then aliases both packages to paths resolved from their local installations.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers: quentinhsu, seefs001

Poem

A bunny hops through dates so fine,
With aliases drawn in a tidy line.
Two libraries join the classic nest,
Rsbuild finds them at its best.
Carrots cheer the build tonight! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly refers to the build-all-web failure that this PR fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants