Closed amanpreet-dev closed 4 years ago
I am getting a build issue in the case --prod tag is used npm build --prod is used.
--prod
npm build --prod
92% chunk asset optimization TerserPlugin <--- Last few GCs ---> [8421:0x10280c000] 61432 ms: Scavenge 1295.1 (1397.8) -> 1295.1 (1398.3) MB, 3.6 / 0.0 ms (average mu = 0.238, current mu = 0.363) allocation failure [8421:0x10280c000] 61465 ms: Scavenge 1295.8 (1398.3) -> 1295.8 (1398.8) MB, 3.5 / 0.0 ms (average mu = 0.238, current mu = 0.363) allocation failure [8421:0x10280c000] 61473 ms: Scavenge 1296.0 (1398.8) -> 1296.0 (1399.3) MB, 3.2 / 0.0 ms (average mu = 0.238, current mu = 0.363) allocation failure <--- JS stacktrace ---> ==== JS stack trace ========================================= 0: ExitFrame [pc: 0x2bf0e73dbe3d] Security context: 0x0a294299e6e9 <JSObject> 1: _send [0xa2994d2b5a1] [internal/child_process.js:736] [bytecode=0xa299b490e69 offset=660](this=0x0a299c296171 <ChildProcess map = 0xa29a2435f21>,message=0x0a29569496f9 <JSArray[4]>,handle=0x0a29dc2026f1 <undefined>,options=0x0a2956949781 <Object map = 0xa29a244fbf9>,callback=0x0a29dc2026f1 <undefined>) 2: send [0xa2994d2b561] [internal/child_proce... FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 0x10003cf99 node::Abort() [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 2: 0x10003d1a3 node::OnFatalError(char const*, char const*) [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 3: 0x1001b7835 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 4: 0x100585682 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 5: 0x100588155 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 6: 0x100583fff v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 7: 0x1005821d4 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 8: 0x10058ea6c v8::internal::Heap::AllocateRawWithLigthRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 9: 0x10058eaef v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 10: 0x100560974 v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 11: 0x1006924e9 v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 12: 0x1001d55cd v8::String::Utf8Length() const [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 13: 0x1000e7ad3 node::StringBytes::Size(v8::Isolate*, v8::Local<v8::Value>, node::encoding) [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 14: 0x1000ebf18 int node::StreamBase::WriteString<(node::encoding)1>(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 15: 0x1000f0a05 void node::StreamBase::JSMethod<node::LibuvStreamWrap, &(int node::StreamBase::WriteString<(node::encoding)1>(v8::FunctionCallbackInfo<v8::Value> const&))>(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 16: 0x100242aaf v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 17: 0x100241ff1 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) [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 18: 0x100241690 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/amansingh/.nvm/versions/node/v10.16.0/bin/node] 19: 0x2bf0e73dbe3d Abort trap: 6
Ok I resolved this issue at my end only. It was due to wrong path.
I am getting a build issue in the case
--prod
tag is usednpm build --prod
is used.