Skip to content

Commit 8738470

Browse files
anandgupta42claude
andcommitted
fix: resolve @opentui/core parser.worker.js via import.meta.resolve
Use import.meta.resolve to find the @opentui/core package directory instead of hardcoding node_modules path, which fails with monorepo hoisting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 614c180 commit 8738470

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/altimate-code/script/build.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ for (const item of targets) {
161161
console.log(`building ${name}`)
162162
await $`mkdir -p dist/${name}/bin`
163163

164-
const parserWorker = fs.realpathSync(path.resolve(dir, "./node_modules/@opentui/core/parser.worker.js"))
164+
const opentuiCoreDir = path.dirname(fileURLToPath(import.meta.resolve("@opentui/core")))
165+
const parserWorker = fs.realpathSync(path.join(opentuiCoreDir, "parser.worker.js"))
165166
const workerPath = "./src/cli/cmd/tui/worker.ts"
166167

167168
// Use platform-specific bunfs root path based on target OS

0 commit comments

Comments
 (0)