Conversation
echarts-for-react@3 的 esm 产物 import 了 tslib,但未把它列为自身 dependency,属于其打包遗漏。本项目通过 npm 安装依赖,npm 不会再解析 node_modules 内其它包的 import,干净环境下 tslib 不会被提升到顶层, 于是 vite 构建报: [vite]: Rollup failed to resolve import "tslib" from "webpage/node_modules/echarts-for-react/esm/index.js" 本地之所以能构建,是因为 node_modules 里残留了其它包带入的 tslib (npm ls 显示大量 extraneous),属于假通过;CI 的 npm ci 是干净安装, 必然复现,导致所有 PR 的 Frontend job 红灯。 修复:把 tslib 显式加入 dependencies(package.json 与 package-lock.json 各一行),不再依赖提升行为。(上游 echarts-for-react 补依赖前, 本项目侧声明是唯一可靠的规避方式。)
buildPageLoginRoutes 的形参是 model.AccessRule(值类型),
但 buildOIDCRoutes 的 providerID==0 分支传了 nil:
cannot use nil as "model.AccessRule" value in argument to
m.buildPageLoginRoutes
改为传 model.AccessRule{}。该分支语义是「未绑定 OIDC provider,
退回页面跳转登录」,AllowedUserIDs 为空恰好表示不限定可登录用户,
与原意图一致(provider 缺失时本就无法按 provider 限定用户)。
这行是 main 分支上的编译错误,go build ./... 整个 backend 失败,
连带 PIKACHUIM#125~PIKACHUIM#129 五个 PR 的 CI 全部 UNSTABLE。
验证:go build ./... 与 go vet ./... 均通过。
This was referenced Sep 30, 2026
Collaborator
Author
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
一次性修复两处阻塞
PR Checks的上游缺陷。两者互相独立,必须同时合入才能让CI 转绿;分开合入的话,中间状态的 PR 仍然会红。
1. 前端:tslib 未声明(#132)
echarts-for-react@3的 esm 产物import ... from "tslib",但其package.json只声明了
size-sensor与fast-deep-equal,漏了 tslib。本地能构建是因为
webpage/node_modules里残留了其它依赖带入的 tslib(
npm ls可见大量extraneous),属于假通过;CI 跑npm ci干净安装,必然复现。修复:把
tslib显式加入dependencies(package.json 与 lock 各 +1 行),不再依赖 npm 的提升行为。
2. 后端:Caddy 编译错误(#130)
buildPageLoginRoutes的形参是值类型model.AccessRule,但buildOIDCRoutes传了
nil。修复:改为model.AccessRule{}。为什么合成一个 PR
pr-checks.yml的backendjobneeds: frontend。frontend 失败时 backend直接
skipped,所以此前没人看到过后端这个编译错误 —— 它一直被掩盖着。只修 tslib 会让 backend 第一次真正跑起来并当场失败(已验证,见下)。
验证
在干净检出
upstream/main的目录中复现(Linux CI 等价环境):npm cinpm run buildgo build ./...补充说明:
go test ./...在 macOS 上还有一个TestValidateRootPath失败(
/var→/private/var符号链接别名),已由 #131 单独修复;Linux CI不受该平台路径别名影响,故本 PR 未包含。