Skip to content

Commit f790f5d

Browse files
n0mahdclaude
andcommitted
fix(server): import jsonc-parser's ESM build so the bundled server starts
The server bundle inlines its dependencies. jsonc-parser's main entry is UMD, whose require("./impl/format") calls the bundler leaves as they are, so the bundled server, and with it the desktop app, exited at startup with "Cannot find module './impl/format'". Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent b5814df commit f790f5d

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎apps/server/src/skills/JsoncSettings.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@
1616
*/
1717
import * as Effect from "effect/Effect";
1818
import * as FileSystem from "effect/FileSystem";
19-
import { applyEdits, modify, parse, type FormattingOptions, type ParseError } from "jsonc-parser";
19+
// The ESM build: the package's `main` is UMD, whose `require("./impl/format")` calls the server
20+
// bundler can't follow, so the bundled server fails to start.
21+
import {
22+
applyEdits,
23+
modify,
24+
parse,
25+
type FormattingOptions,
26+
type ParseError,
27+
} from "jsonc-parser/lib/esm/main.js";
2028
import { writeFileStringAtomically } from "@t3tools/shared/atomicWrite";
2129

2230
/** Keys of objects, and positions in arrays. */

0 commit comments

Comments
 (0)