Compiler errors (in browser ide) + Bolt.diy electron build issues

hi

Sometimes, when i put a prompt to generate a website or build an app, I’m getting the following errors relate to npm inside the browser terminal:

 # Create a new project directory
mkdir vite-project
cd vite-project


~/project
❯ # Initialize the project
npm init -y


~/project
❯ # Install Vite template (assuming the template is in a repository)
npm install --save-dev vite @vitejs/template


~/project
❯ # Start the development server
npm run dev

~/project
❯ jsh: Cannot read properties of undefined (reading 'exitCode')

~/project/vite-project
❯ jsh: Cannot read properties of undefined (reading 'exitCode')

~/project/vite-project
❯ jsh: Cannot read properties of undefined (reading 'exitCode')

~/project/vite-project
❯ jsh: Cannot read properties of undefined (reading 'exitCode')

~/project/vite-project
❯ jsh: Cannot read properties of undefined (reading 'exitCode')

~/project/vite-project
❯ 
> vite-starter@0.0.0 dev
> vite

Wrote to /home/project/package.json:

{
  "name": "vite-starter",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  },
  "devDependencies": {
    "vite": "^5.4.8"
  },
  "main": "main.js",
  "keywords": [],
  "author": "",
  "license": "ISC",
  "description": ""
}



jsh: Cannot read properties of undefined (reading 'exitCode')

~/project/vite-project
\jsh: command not found: vite
jsh: Cannot read properties of undefined (reading 'exitCode')

~/project/vite-project
npm error code E404
npm error 404 Not Found - GET https://registry.npmjs.org/@vitejs%2ftemplate - Not found
npm error 404
npm error 404  '@vitejs/template@*' is not in this registry.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
npm error A complete log of this run can be found in: /home/.npm/_logs/2025-05-02T02_50_19_460Z-debug-0.log
jsh: Cannot read properties of undefined (reading 'exitCode')

**what is the root cause of the npm error above when trying to build new projects? how do we address this and make sure the workbench is auto building and orchestrating the project automatically? **

Furthermore, I’m getting the following error when i run pnpm run electron:build:unpack :

user@user-Mac-mini bolt-5.diy-main % pnpm run electron:build:unpack

> bolt@0.0.7 electron:build:unpack /Users/user/Downloads/bolt-5.diy-main
> rm -rf dist && pnpm electron:build:renderer && pnpm electron:build:deps && electron-builder --dir


> bolt@0.0.7 electron:build:renderer /Users/user/Downloads/bolt-5.diy-main
> remix vite:build --config vite-electron.config.js

fatal: not a git repository (or any of the parent directories): .git
 warn  Data fetching is changing to a single fetch in React Router v7
┃ You can use the `v3_singleFetch` future flag to opt-in early.
┃ -> https://remix.run/docs/en/2.13.1/start/future-flags#v3_singleFetch
┗
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
vite v5.4.18 building for production...
app/components/ui/Collapsible.tsx (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
app/components/ui/ScrollArea.tsx (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
app/components/ui/Badge.tsx (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
✓ 5111 modules transformed.
Generated an empty chunk: "api.system.process-info".
Generated an empty chunk: "api.supabase.variables".
Generated an empty chunk: "api.system.diagnostics".
Generated an empty chunk: "api.system.memory-info".
Generated an empty chunk: "api.models._provider".
Generated an empty chunk: "api.system.disk-info".
Generated an empty chunk: "api.export-api-keys".
Generated an empty chunk: "api.system.app-info".
Generated an empty chunk: "api.system.git-info".
Generated an empty chunk: "api.netlify-deploy".
Generated an empty chunk: "api.supabase.query".
Generated an empty chunk: "api.check-env-key".
Generated an empty chunk: "api.vercel-deploy".
Generated an empty chunk: "api.git-proxy._".
Generated an empty chunk: "api.enhancer".
Generated an empty chunk: "api.supabase".
Generated an empty chunk: "api.llmcall".
Generated an empty chunk: "api.health".
Generated an empty chunk: "api.models".
Generated an empty chunk: "api.update".
Generated an empty chunk: "api.chat".
[unocss] The labeled variant is experimental and may not follow semver.
[unocss] failed to load icon "lucide:clock"
[unocss] failed to load icon "lucide:message-square"
[unocss] failed to load icon "lucide:search"
[unocss] failed to load icon "si:netlify"
rendering chunks (2)...
<--- Last few GCs --->

[50757:0x158008000]    41754 ms: Mark-Compact 1996.9 (2094.7) -> 1996.9 (2094.7) MB, pooled: 1 MB, 916.21 / 0.00 ms  (average mu = 0.086, current mu = 0.006) allocation failure; scavenge might not succeed
[50757:0x158008000]    42571 ms: Mark-Compact 1997.9 (2095.7) -> 1997.9 (2095.7) MB, pooled: 1 MB, 815.12 / 0.00 ms  (average mu = 0.052, current mu = 0.003) allocation failure; scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

 1: 0x10269ace0 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
 2: 0x1028c2800 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
 3: 0x102ac7014 v8::internal::Heap::stack() [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
 4: 0x102adc100 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_10::operator()() const [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
 5: 0x102adb9f8 void heap::base::Stack::SetMarkerAndCallbackImpl<v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_10>(heap::base::Stack*, void*, void const*) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
 6: 0x1033d8998 PushAllRegistersAndIterateStack [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
 7: 0x102ac50e8 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
 8: 0x102abb550 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
 9: 0x102abbf1c v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
10: 0x102a8e2e8 v8::internal::FactoryBase<v8::internal::Factory>::NewRawOneByteString(int, v8::internal::AllocationType) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
11: 0x102a9f1e4 v8::internal::Factory::NewStringFromUtf8(v8::base::Vector<unsigned char const>, unibrow::Utf8Variant, v8::internal::AllocationType) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
12: 0x1028e0748 v8::String::NewFromUtf8(v8::Isolate*, char const*, v8::NewStringType, int) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
13: 0x1027ad7cc node::(anonymous namespace)::MakeString(v8::Isolate*, char const*, unsigned long, node::encoding) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
14: 0x1027ad6d0 node::StringDecoder::DecodeData(v8::Isolate*, char const*, unsigned long*) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
15: 0x1027adbdc node::(anonymous namespace)::DecodeData(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
16: 0x10344aaac Builtins_CallApiCallbackOptimizedNoProfiling [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
17: 0x10a491ea4 
18: 0x10a645254 
19: 0x103485e20 Builtins_AsyncFunctionAwaitResolveClosure [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
20: 0x103553298 Builtins_PromiseFulfillReactionJob [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
21: 0x103475214 Builtins_RunMicrotasks [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
22: 0x1034463f0 Builtins_JSRunMicrotasksEntry [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
23: 0x102a1ddb8 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
24: 0x102a1e654 v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
25: 0x102a1e78c v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate*, v8::internal::MicrotaskQueue*) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
26: 0x102a4a684 v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
27: 0x102a4af3c v8::internal::MicrotaskQueue::PerformCheckpoint(v8::Isolate*) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
28: 0x1025b9994 node::InternalCallbackScope::Close() [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
29: 0x1025b9454 node::InternalCallbackScope::~InternalCallbackScope() [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
30: 0x102692da0 node::fs::FSReqPromise<node::AliasedBufferBase<double, v8::Float64Array>>::Resolve(v8::Local<v8::Value>) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
31: 0x1026a1c98 node::fs::AfterInteger(uv_fs_s*) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
32: 0x102693998 node::MakeLibuvRequestCallback<uv_fs_s, void (*)(uv_fs_s*)>::Wrapper(uv_fs_s*) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
33: 0x10342028c uv__work_done [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
34: 0x103423f98 uv__async_io [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
35: 0x103437b74 uv__io_poll [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
36: 0x103424530 uv_run [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
37: 0x1025ba4e4 node::SpinEventLoopInternal(node::Environment*) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
38: 0x1026e2df0 node::NodeMainInstance::Run(node::ExitCode*, node::Environment*) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
39: 0x1026e2b8c node::NodeMainInstance::Run() [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
40: 0x102658dfc node::Start(int, char**) [/Users/user/.nvm/versions/node/v23.2.0/bin/node]
41: 0x1952a7f28 start [/usr/lib/dyld]
 ELIFECYCLE  Command failed.
sh: line 1: 50740 Abort trap: 6           pnpm electron:build:renderer
 ELIFECYCLE  Command failed with exit code 134.
user@user-Mac-mini bolt-5.diy-main % export NODE_OPTIONS="--max-old-space-size=8192" && pnpm run electron:build:unpack

> bolt@0.0.7 electron:build:unpack /Users/user/Downloads/bolt-5.diy-main
> rm -rf dist && pnpm electron:build:renderer && pnpm electron:build:deps && electron-builder --dir


> bolt@0.0.7 electron:build:renderer /Users/user/Downloads/bolt-5.diy-main
> remix vite:build --config vite-electron.config.js

fatal: not a git repository (or any of the parent directories): .git
 warn  Data fetching is changing to a single fetch in React Router v7
┃ You can use the `v3_singleFetch` future flag to opt-in early.
┃ -> https://remix.run/docs/en/2.13.1/start/future-flags#v3_singleFetch
┗
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
vite v5.4.18 building for production...
app/components/ui/Collapsible.tsx (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
app/components/ui/Badge.tsx (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
app/components/ui/ScrollArea.tsx (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
✓ 5111 modules transformed.
Generated an empty chunk: "api.system.process-info".
Generated an empty chunk: "api.supabase.variables".
Generated an empty chunk: "api.system.diagnostics".
Generated an empty chunk: "api.system.memory-info".
Generated an empty chunk: "api.models._provider".
Generated an empty chunk: "api.system.disk-info".
Generated an empty chunk: "api.export-api-keys".
Generated an empty chunk: "api.system.app-info".
Generated an empty chunk: "api.system.git-info".
Generated an empty chunk: "api.netlify-deploy".
Generated an empty chunk: "api.supabase.query".
Generated an empty chunk: "api.check-env-key".
Generated an empty chunk: "api.vercel-deploy".
Generated an empty chunk: "api.git-proxy._".
Generated an empty chunk: "api.enhancer".
Generated an empty chunk: "api.supabase".
Generated an empty chunk: "api.llmcall".
Generated an empty chunk: "api.health".
Generated an empty chunk: "api.models".
Generated an empty chunk: "api.update".
Generated an empty chunk: "api.chat".
[unocss] The labeled variant is experimental and may not follow semver.
[unocss] failed to load icon "lucide:clock"
[unocss] failed to load icon "lucide:message-square"
[unocss] failed to load icon "lucide:search"
[unocss] failed to load icon "si:netlify"
rendering chunks (3)...[unocss] failed to load icon "ph:plug-x"
[unocss] failed to load icon "ph:git-repository"
[unocss] failed to load icon "ph:rotate-right"
[unocss] failed to load icon "ph:file-json"
[unocss] failed to load icon "ph:microchip"
[unocss] failed to load icon "ph:node"
[unocss] failed to load icon "ph:layout-dashboard"
[unocss] failed to load icon "ph-filter-duotone"
x Build failed in 39.01s
[vite:css-post] css content for "" was not found
    at Object.renderChunk (file:///Users/user/Downloads/bolt-5.diy-main/node_modules/.pnpm/vite@5.4.18_sass-embedded@1.86.3/node_modules/vite/dist/node/chunks/dep-DbT5NFX0.js:36389:19)
    at file:///Users/user/Downloads/bolt-5.diy-main/node_modules/.pnpm/rollup@4.40.0/node_modules/rollup/dist/es/shared/node-entry.js:22188:40 {
  code: 'PLUGIN_ERROR',
  plugin: 'vite:css-post',
  hook: 'renderChunk'
}
 ELIFECYCLE  Command failed with exit code 1.
 ELIFECYCLE  Command failed with exit code 1.

I updated the build command to this: export NODE_OPTIONS="--max-old-space-size=8192" && pnpm run electron:build:unpack and still i am getting the error to build the bolt.diy electron desktop app

How do i successfully build the electron app? i am on mac and have sufficient memory onboard.

@leex279 any advice or help would be extremely appreciated with this.

any chance i can get some insight on this @leex279 ?

Hey, I dont know about that stuff, but @xKevIsDev is also on a Mac and did the release builds recently, so I guess he can help :slight_smile:

1 Like