Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

fix(publish): remove app/vscode-extension/ after build to prevent Z_DATA_ERROR in npm pack

diegosouzapwc63209200ed5
diff --git a/scripts/prepublish.mjs b/scripts/prepublish.mjs
index 434d7212d6..920e0b7b15 100644
--- a/scripts/prepublish.mjs
+++ b/scripts/prepublish.mjs
@@ -278,6 +278,16 @@ if (existsSync(swcHelpersSrc) && !existsSync(swcHelpersDst)) {
console.log(" ✅ @swc/helpers included in standalone build.");
}
+// ── Step 10.6: Remove vscode-extension from standalone build ──
+// The vscode extension test runtime (vsda.node) is a platform-native binary
+// that triggers Z_DATA_ERROR during npm pack. Remove it from the bundle.
+const vscodeBuildDir = join(APP_DIR, "vscode-extension");
+if (existsSync(vscodeBuildDir)) {
+ console.log(" 🧹 Removing app/vscode-extension/ (not needed in npm package)...");
+ rmSync(vscodeBuildDir, { recursive: true, force: true });
+ console.log(" ✅ app/vscode-extension/ removed.");
+}
+
// ── Done ───────────────────────────────────────────────────
const appPkg = join(APP_DIR, "package.json");
if (existsSync(appPkg)) {