gpt4 book ai didi

angular - Azure Angular 项目构建失败并出现 fatal error : Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

转载 作者:行者123 更新时间:2023-12-05 03:00:58 33 4
gpt4 key购买 nike

Azure Angular 构建失败 -

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

我们尝试了 - npm run build:ssr --max-old-space-size=1024 m 但它没有用。我们确实尝试设置不同的尺寸。

这是完整的错误:

2019-06-02T04:27:51.2432150Z [command]C:\windows\system32\cmd.exe /D /S /C "C:\npm\prefix\npm.cmd run build:ssr"
2019-06-02T04:31:03.6579570Z FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
2019-06-02T04:31:03.6580213Z 1: 00007FF675FAF04A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+5114
2019-06-02T04:31:03.6580271Z 2: 00007FF675F8A0C6 node::MakeCallback+4518
2019-06-02T04:31:03.6580376Z 3: 00007FF675F8AA30 node_module_register+2032
2019-06-02T04:31:03.6580421Z 4: 00007FF6762120EE v8::internal::FatalProcessOutOfMemory+846
2019-06-02T04:31:03.6580464Z 5: 00007FF67621201F v8::internal::FatalProcessOutOfMemory+639
2019-06-02T04:31:03.6580573Z 6: 00007FF676732BC4 v8::internal::Heap::MaxHeapGrowingFactor+9556
2019-06-02T04:31:03.6580676Z 7: 00007FF676729C46 v8::internal::ScavengeJob::operator=+24310
2019-06-02T04:31:03.6580721Z 8: 00007FF67672829C v8::internal::ScavengeJob::operator=+17740
2019-06-02T04:31:03.6580764Z 9: 00007FF676730F87 v8::internal::Heap::MaxHeapGrowingFactor+2327
2019-06-02T04:31:03.6580880Z 10: 00007FF676731006 v8::internal::Heap::MaxHeapGrowingFactor+2454
2019-06-02T04:31:03.6580923Z 11: 00007FF6762ECDB7 v8::internal::Factory::NewFillerObject+55
2019-06-02T04:31:03.6580965Z 12: 00007FF676382CC6 v8::internal::WasmJs::Install+29414
2019-06-02T04:31:03.6581005Z 13: 000002DF3095C5C1
2019-06-02T04:31:03.6581101Z npm ERR! code ELIFECYCLE
2019-06-02T04:31:03.6581140Z npm ERR! errno 134
2019-06-02T04:31:03.6581185Z npm ERR! futek-ui@0.0.0 build:client-and-server-bundles: `ng build --prod && ng run FutekUI:server`
2019-06-02T04:31:03.6581285Z npm ERR! Exit status 134
2019-06-02T04:31:03.6581327Z npm ERR!
2019-06-02T04:31:03.6581371Z npm ERR! Failed at the futek-ui@0.0.0 build:client-and-server-bundles script.
2019-06-02T04:31:03.6581417Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-06-02T04:31:03.6581502Z
2019-06-02T04:31:03.6581545Z npm ERR! A complete log of this run can be found in:
2019-06-02T04:31:03.6582900Z npm ERR! C:\npm\cache\_logs\2019-06-02T04_31_03_522Z-debug.log
2019-06-02T04:31:03.6582942Z npm ERR! code ELIFECYCLE
2019-06-02T04:31:03.6583053Z npm ERR! errno 134
2019-06-02T04:31:03.6583101Z npm ERR! futek-ui@0.0.0 build:ssr: `npm run build:client-and-server-bundles && npm run webpack:server`
2019-06-02T04:31:03.6583142Z npm ERR! Exit status 134
2019-06-02T04:31:03.6583233Z npm ERR!
2019-06-02T04:31:03.6583275Z npm ERR! Failed at the futek-ui@0.0.0 build:ssr script.
2019-06-02T04:31:03.6583321Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-06-02T04:31:03.6583489Z
2019-06-02T04:31:03.6583584Z npm ERR! A complete log of this run can be found in:
2019-06-02T04:31:03.6583613Z
2019-06-02T04:31:03.6583938Z npm ERR! C:\npm\cache\_logs\2019-06-02T04_31_03_584Z-debug.log
2019-06-02T04:31:03.6584033Z > futek-ui@0.0.0 build:ssr D:\a\1\s\FutekUI
2019-06-02T04:31:03.6584078Z > npm run build:client-and-server-bundles && npm run webpack:server
2019-06-02T04:31:03.6584115Z
2019-06-02T04:31:03.6584140Z

最佳答案

对我来说,通过将以下变量添加到我的链接变量组(库)中,这个错误得到了解决。或者,您可以将其作为单独的 Pipeline 变量 添加到您的构建管道中:

名称:NODE_OPTIONS
值:--max_old_space_size=16384

在构建管道或链接库中定义的所有变量都将作为环境变量导出。

关于angular - Azure Angular 项目构建失败并出现 fatal error : Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56422857/

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