gpt4 book ai didi

node.js - Windows10 - fatal error : Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

转载 作者:太空宇宙 更新时间:2023-11-04 00:01:11 56 4
gpt4 key购买 nike

执行任何 npm 命令时 JavaScript 堆内存不足。另外,我在用户文件夹中没有看到 .npmrc 文件

Node 版本最新:v10.15.1,npm:6.4.1

我尝试重新安装nodejs和npm我尝试使用命令 node --max-old-space-size=8192 来增加大小

以及论坛中提供的其他命令,但没有任何帮助。粘贴上面的日志。

[ .................] \ fetchMetadata: sill install loadAllDepsIntoIdealTree
<--- Last few GCs --->

[25040:0000019200D9B400] 314378 ms: Scavenge 7987.0 (8133.8) -> 7985.4 (8134.8) MB, 15.4 / 0.0 ms (average mu = 0.068, current mu = 0.028) allocation failure
[25040:0000019200D9B400] 314438 ms: Scavenge 7987.7 (8134.8) -> 7986.5 (8137.8) MB, 15.1 / 0.0 ms (average mu = 0.068, current mu = 0.028) allocation failure
[25040:0000019200D9B400] 314524 ms: Scavenge 7989.2 (8137.8) -> 7987.8 (8148.3) MB, 16.8 / 0.0 ms (average mu = 0.068, current mu = 0.028) allocation failure

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF60BC20EFA v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4810
2: 00007FF60BBFA296 node::MakeCallback+4518
3: 00007FF60BBFAC80 node_module_register+2160
4: 00007FF60BE909BE v8::internal::FatalProcessOutOfMemory+846
5: 00007FF60BE908EF v8::internal::FatalProcessOutOfMemory+639
6: 00007FF60C3CE954 v8::internal::Heap::MaxHeapGrowingFactor+11476
7: 00007FF60C3C50B7 v8::internal::ScavengeJob::operator=+25543
8: 00007FF60C3C362C v8::internal::ScavengeJob::operator=+18748
9: 00007FF60C3C97A7 v8::internal::Heap::CreateFillerObjectAt+983
10: 00007FF60C24E87C v8::internal::interpreter::Interpreter::GetDispatchCountersObject+81388
11: 00007FF60BB79ACE v8::internal::StackGuard::ArchiveSpacePerThread+59982
12: 00007FF60BB7A0E3 v8::internal::StackGuard::ArchiveSpacePerThread+61539
13: 00007FF60BC643F4 uv_dlerror+2436
14: 00007FF60BC65003 uv_run+179
15: 00007FF60BC0185E node::NewContext+1966
16: 00007FF60BC02145 node::NewIsolate+725
17: 00007FF60BC02A34 node::Start+2004
18: 00007FF60BAA9719 node::MultiIsolatePlatform::MultiIsolatePlatform+601
19: 00007FF60C69DF28 v8::internal::compiler::OperationTyper::ToBoolean+142280
20: 00007FFE468A3034 BaseThreadInitThunk+20
21: 00007FFE48B53691 RtlUserThreadStart+33

最佳答案

对我来说,以下命令有效

node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --prod

关于node.js - Windows10 - fatal error : Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54660063/

56 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com