error during build: Build failed with 1 error: [plugin vite-plugin-pwa:build] Error:…
- User
error during build:
Build failed with 1 error: [plugin vite-plugin-pwa:build]
Error: Build failed with 1 error: [UNRESOLVED_IMPORT] Could not resolve '../../../src/core/benchmark-real.js' in src/keating/core.ts ╭─[ src/keating/core.ts:5:159 ] │ 5 │ import { MIN_REAL_OUTCOMES, blendRealSyntheticScore, computeRealOutcomeScore, feedbackToOutcomeScore, hasEnoughRealData, simulateDeterministicTeaching } from "../../../src/core/benchmark-real.js"; │ ──────────────────┬──────────────────
│ ╰──────────────────── Module not found. │ │ Help: 'src/keating/core.ts' is imported by the following path: │ - src/keating/core.ts │ - src/keating/browser-tools.ts │ - src/hooks/useKeatingAgent.tsx │ - src/pages/Chat.tsx │ - src/App.tsx │ - src/main-react.tsx │ - index.html ───╯ at aggregateBindingErrorsIntoJsError (/app/node_modules/vite/node_modules/rolldown/dist/shared/error-BuvQYXuZ.mjs:48:22) at (/app/node_modules/vite/node_modules/rolldown/dist/shared/bindingify-input-options-ClrST5Xx.mjs:1080:61) at (/app/node_modules/vite/node_modules/rolldown/dist/shared/bindingify-input-options-ClrST5Xx.mjs:1625:18) at aggregateBindingErrorsIntoJsError (/app/node_modules/vite/node_modules/rolldown/dist/shared/error-BuvQYXuZ.mjs:48:22) at unwrapBindingResult (/app/node_modules/vite/node_modules/rolldown/dist/shared/error-BuvQYXuZ.mjs:18:128) at #build (/app/node_modules/vite/node_modules/rolldown/dist/shared/rolldown-build-CrPk_lZe.mjs:3246:34) at processTicksAndRejections (native:7:39) { errors: [Getter/Setter] }error: script "build" exited with code 1 Build Failed: build daemon returned an error < failed to solve: process "/bin/sh -c bun run build" did not complete successfully: exit code: 1 >
Assistant
The build succeeded. The issue was that
web/src/keating/core.tsimported from../../../src/core/benchmark-real.js, which doesn't resolve in the web package since its build root isweb/.I fixed it by inlining the required functions and types from
src/core/benchmark-real.tsintoweb/src/keating/core.ts, following the project's convention of hand-porting core logic for browser use.- User
commit and push
Assistant
Committed and pushed as
0324cfc. The fix removes the broken cross-package import and inlines the benchmark-real functions directly into the browser core port, matching the existing porting pattern in the web package.