Skip to content

Commit dd47ebf

Browse files
authored
fix: replace jimp with selective @jimp/* imports to fix ESM crash (#333)
The full `jimp` package pulls in `@jimp/plugin-print`, which has a broken ESM default import of `simple-xml-to-json` — crashing on `npx` startup (Node 22+). We only use read, crop, and write, so import `@jimp/core` with just the plugins and formats we need. Closes #329
1 parent a077ace commit dd47ebf

4 files changed

Lines changed: 33 additions & 348 deletions

File tree

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,16 @@
5151
"license": "MIT",
5252
"dependencies": {
5353
"@figma/rest-api-spec": "^0.33.0",
54+
"@jimp/core": "^1.6.0",
55+
"@jimp/js-gif": "^1.6.0",
56+
"@jimp/js-jpeg": "^1.6.0",
57+
"@jimp/js-png": "^1.6.0",
58+
"@jimp/plugin-crop": "^1.6.0",
5459
"@modelcontextprotocol/sdk": "^1.27.1",
5560
"cleye": "^2.2.1",
5661
"cross-env": "^7.0.3",
5762
"dotenv": "^16.4.7",
5863
"express": "^5.2.1",
59-
"jimp": "^1.6.0",
6064
"js-yaml": "^4.1.1",
6165
"remeda": "^2.20.1",
6266
"zod": "^3.25.76"

0 commit comments

Comments
 (0)