How to check for prod mode for issue: Enhance prompt doesn't work on prod mode #1448

I am unable to check for prod mode to replicate the issue, kindly suggest me a direction to solve this.

I am using Docker in general.
For image:
npm run dockerbuild
For container:
docker compose --profile production up

this is showing me issue:

------                                                                                                                                                                     
 > [app-prod bolt-ai-production 2/2] RUN pnpm run build:                                                                                                                   
0.885                                                                                                                                                                      
0.885 > bolt@0.0.7 build /app                                                                                                                                              
0.885 > remix vite:build                                                                                                                                                   
0.885                                                                                                                                                                      
1.946 fatal: not a git repository (or any of the parent directories): .git
1.993 [warn] Data fetching is changing to a single fetch in React Router v7
1.993 ┃ You can use the `v3_singleFetch` future flag to opt-in early.
1.993 ┃ -> https://remix.run/docs/en/2.13.1/start/future-flags#v3_singleFetch
1.993 ┗
2.167 fatal: not a git repository (or any of the parent directories): .git
3.960 fatal: not a git repository (or any of the parent directories): .git
4.115 fatal: not a git repository (or any of the parent directories): .git
4.426 vite v5.4.14 building for production...
4.490 transforming...
7.800 [plugin:vite:resolve] [plugin vite:resolve] Module "path" has been externalized for browser compatibility, imported by "/app/node_modules/.pnpm/istextorbinary@9.5.0/node_modules/istextorbinary/edition-browsers/index.js". See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
7.802 [plugin:vite:resolve] [plugin vite:resolve] Module "path" has been externalized for browser compatibility, imported by "/app/node_modules/.pnpm/istextorbinary@9.5.0/node_modules/istextorbinary/edition-browsers/index.js". See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
9.162 app/components/ui/Collapsible.tsx (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
9.164 app/components/ui/ScrollArea.tsx (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
9.176 app/components/ui/Badge.tsx (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
24.38 node_modules/.pnpm/istextorbinary@9.5.0/node_modules/istextorbinary/edition-browsers/index.js (18:31): "basename" is not exported by "__vite-browser-external", imported by "node_modules/.pnpm/istextorbinary@9.5.0/node_modules/istextorbinary/edition-browsers/index.js".
32.16 ✓ 3119 modules transformed.
32.25 Generated an empty chunk: "api.models._provider".
33.22 Generated an empty chunk: "api.system.app-info".
33.22 Generated an empty chunk: "api.system.git-info".
33.22 Generated an empty chunk: "api.check-env-key".
33.22 Generated an empty chunk: "api.git-proxy._".
33.22 Generated an empty chunk: "api.enhancer".
33.22 Generated an empty chunk: "api.llmcall".
33.22 Generated an empty chunk: "api.deploy".
33.22 Generated an empty chunk: "api.health".
33.22 Generated an empty chunk: "api.models".
33.22 Generated an empty chunk: "api.update".
33.22 Generated an empty chunk: "api.chat".
34.16 [unocss] The labeled variant is experimental and may not follow semver.
36.78 [unocss] failed to load icon "lucide:clock"
36.78 [unocss] failed to load icon "lucide:message-square"
36.78 [unocss] failed to load icon "lucide:search"
36.85 rendering chunks...
43.19 
43.19 <--- Last few GCs --->
43.19 
43.19 [30:0x1badaf30]    41167 ms: Mark-Compact 1943.2 (2086.9) -> 1943.2 (2080.2) MB, 551.17 / 0.00 ms  (average mu = 0.102, current mu = 0.023) allocation failure; scavenge might not succeed
43.19 [30:0x1badaf30]    41724 ms: Mark-Compact 1951.2 (2088.3) -> 1951.2 (2082.3) MB, 549.03 / 0.00 ms  (average mu = 0.060, current mu = 0.014) allocation failure; scavenge might not succeed
43.19 
43.19 
43.19 <--- JS stacktrace --->
43.19 
43.19 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
43.19 ----- Native stack trace -----
43.19 
43.19  1: 0xb8ced1 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node]
43.19  2: 0xf06460 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
43.19  3: 0xf06747 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
43.19  4: 0x11182e5  [node]
43.19  5: 0x1118874 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
43.20  6: 0x112f764 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [node]
43.20  7: 0x112ff7c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
43.20  8: 0x1106281 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
43.20  9: 0x1107415 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
43.20 10: 0x10e3b36 v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
43.20 11: 0x10d5764 v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawWithImmortalMap(int, v8::internal::AllocationType, v8::internal::Map, v8::internal::AllocationAlignment) [node]
43.20 12: 0x10d7f46 v8::internal::FactoryBase<v8::internal::Factory>::NewRawOneByteString(int, v8::internal::AllocationType) [node]
43.20 13: 0x10eef64 v8::internal::Factory::NewStringFromUtf8(v8::base::Vector<char const> const&, v8::internal::AllocationType) [node]
43.20 14: 0xf18cf2 v8::String::NewFromUtf8(v8::Isolate*, char const*, v8::NewStringType, int) [node]
43.20 15: 0xdf17e7  [node]
43.20 16: 0xdf191f node::StringDecoder::DecodeData(v8::Isolate*, char const*, unsigned long*) [node]
43.20 17: 0xdf1e5d  [node]
43.20 18: 0xf6e88f v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [node]
43.20 19: 0xf6f0fd  [node]
43.20 20: 0xf6f5c5 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
43.20 21: 0x1979df6  [node]
43.58 Aborted (core dumped)
43.58  ELIFECYCLE  Command failed with exit code 134.
------
failed to solve: process "/bin/sh -c pnpm run build" did not complete successfully: exit code: 134
exit status 1

Hi,

Edit your “Dockerfile” and put this in line 53

ENV NODE_OPTIONS="--max-old-space-size=4096"

1 Like

Thank you it is working now .

1 Like

Should I consist this change in PR too or remove it before making one?

good :slight_smile:

@thecodacus does it make sense we add this officially? think it has no negative impacts for others.

1 Like

I made the PR for the issue and curenlty removed the dockerfile line update.

@leex279 On clicking enhance prompt, the prompt disappears from the prompt box. Tried multiple times, multiple browsers.

may you provide error image or screencast, if possible.

here you go, Unique Download Link | WeTransfer

This was the issue in first place: Issue.check this solution that I figured out: PR