[英]Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory in angular
[英]Angular-ng serve- Ineffective mark-compacts near heap limit Allocation failed
我在ng service angular 項目上收到此錯誤。 ng build --prod 工作正常
<--- Last few GCs --->
[4916:00000276B1C57010] 588109 ms: Scavenge (reduce) 8180.7 (8204.3) -> 8180.6 (8205.1) MB, 36.1 / 0.0 ms (average mu = 0.081, current mu = 0.007) allocation failure
[4916:00000276B1C57010] 673012 ms: Mark-sweep (reduce) 8181.3 (8202.1) -> 8181.0 (8203.3) MB, 84897.4 / 0.6 ms (average mu = 0.041, 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
1: 00007FF6A3CF3E0F napi_wrap+108911
2: 00007FF6A3C97E16 v8::base::CPU::has_sse+61910
3: 00007FF6A3C98D16 node::OnFatalError+294
4: 00007FF6A4570CEE v8::Isolate::ReportExternalAllocationLimitReached+94
5: 00007FF6A4555ACD v8::SharedArrayBuffer::Externalize+781
6: 00007FF6A43FF95C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1516
7: 00007FF6A440ACEA v8::internal::Heap::ProtectUnprotectedMemoryChunks+1258
8: 00007FF6A4407E99 v8::internal::Heap::PageFlagsAreConsistent+2457
9: 00007FF6A43FCA71 v8::internal::Heap::CollectGarbage+2033
10: 00007FF6A43FAC95 v8::internal::Heap::AllocateExternalBackingStore+1349
11: 00007FF6A441AFEB v8::internal::Factory::NewFillerObject+203
12: 00007FF6A4149F81 v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=+1409
13: 00007FF6A45F9BAD v8::internal::SetupIsolateDelegate::SetupHeap+465229
14: 00007FF6A459378D v8::internal::SetupIsolateDelegate::SetupHeap+46381
15: 00000360181DD9FC
節點版本: v14.17.0
角度:
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 11.0.5
Node: 14.17.0
OS: win32 x64
Angular: 11.0.5
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1100.5
@angular-devkit/build-angular 0.1100.5
@angular-devkit/core 11.0.5
@angular-devkit/schematics 11.0.5
@angular/cdk 11.2.13
@angular/material 11.1.2
@schematics/angular 11.0.5
@schematics/update 0.1100.5
rxjs 6.6.3
typescript 4.0.5
我嘗試了各種命令,但沒有一個有效: >node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng serve
你可以試試這個命令:
node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve
我在一個非常相似的帖子中看到過。 這應該可以臨時修復 javascript 內存堆問題
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.