From 872a4573f7e5c8e77e8dafaaee8dbfaaf90ff4bb Mon Sep 17 00:00:00 2001 From: tomymaritano Date: Fri, 24 Apr 2026 11:39:59 -0300 Subject: [PATCH] fix: exclude @readied/* from ASAR node_modules electron-builder auto-includes workspace packages in node_modules inside the ASAR even though electron-vite already bundles them. The CJS require in Electron finds the unbundled node_modules copy first, which fails with ERR_PACKAGE_PATH_NOT_EXPORTED because the workspace packages point to .ts source files in their exports map. Fix: add !node_modules/@readied/** to electron-builder files config so only the bundled code in out/ is used at runtime. Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/desktop/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 0b77a0b0..ad50eb37 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -97,7 +97,8 @@ }, "files": [ "out/**/*", - "!out/**/*.map" + "!out/**/*.map", + "!node_modules/@readied/**" ], "mac": { "category": "public.app-category.productivity",