The web background yard build
built by react + ant design + UMI reported the following error:
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x1011c2ff5 node::Abort() (.cold.1) [/usr/local/bin/node]
2: 0x10009fbc9 node::Abort() [/usr/local/bin/node]
3: 0x10009fd2f node::OnFatalError(char const*, char const*) [/usr/local/bin/node]
4: 0x1001e3907 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
5: 0x1001e38a7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
6: 0x1003695e5 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/bin/node]
7: 0x10036ae3a v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/usr/local/bin/node]
8: 0x1003678be v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/bin/node]
9: 0x100365670 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/node]
10: 0x10037149a v8::internal::Heap::AllocateRawWithLightRetry(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/bin/node]
11: 0x100371521 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/bin/node]
12: 0x1003418eb v8::internal::Factory::NewRawTwoByteString(int, v8::internal::AllocationType) [/usr/local/bin/node]
13: 0x1005a70ab v8::internal::String::SlowFlatten(v8::internal::Isolate*, v8::internal::Handle<v8::internal::ConsString>, v8::internal::AllocationType) [/usr/local/bin/node]
14: 0x10020170d v8::String::Utf8Length(v8::Isolate*) const [/usr/local/bin/node]
15: 0x10007e96b node::Buffer::(anonymous namespace)::ByteLengthUtf8(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
16: 0x10024f438 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [/usr/local/bin/node]
17: 0x10024e9f9 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
18: 0x10024e162 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
19: 0x1009d3ab9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [/usr/local/bin/node]
20: 0x100959364 Builtins_InterpreterEntryTrampoline [/usr/local/bin/node]
The solution is as follows: put node_ Delete the modules
and package lock.json
files, Re yarn install
, and then yarn build
, the package is successful
Read More:
- [Solved] NPM run build package error: Ineffective mark-compacts near heap limit Allocation failed – JavaScript heap out of memory
- [Solved] FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed – JavaScript heap out of me
- [Solved] Hexo FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed
- Node Memory Overflow: FATAL ERROR: Reached heap limit Allocation failed – JavaScript heap out of memory
- [Solved] NPM Error: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed
- Solve Error: call_and_retry_last allocation failed – javascript heap out of memory
- Error occurred during initialization of VM Could not reserve enough space for 1572864KB object heap
- IDEA reports an error Could not reserve enough space for xxxxKB object heap processing
- [Solved] Neo4j Error: Error occurred during initialization of VM Incompatible minimum and maximum heap sizes spec
- [Solved] Response Export error on submit request on future invoke, java.lang.OutOfMemoryError: Java heap space
- PyCharm Error: RuntimeError: CUDA out of memory [How to Solve]
- [Solved] RuntimeError: CUDA error: out of memory
- Impala Find Error: InternalException: Memory limit exceeded: Error occurred on backend
- How to Solve Git error: out of memory
- How to Solve Docker ERROR: Service’workspace’ failed to build: ERROR: Service’php-fpm’ failed to build
- failed to obtain in-memory shard lock [How to Solve]
- [Solved] “HttpSendRequest“ failed, Windows error code=12002 andretry limit (0) exceeded for URL
- Jenkins uses NPM to build Vue error, and the manual build is normal
- How to Solve MVC Error: Build failed.
- [Solved] Angular12 ng build Error: Index html generation failed.