gpt4 book ai didi

node.js - 使用 webfont 生成字体 : FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

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

我运行my script使用webfont在包含 41214 SVG 文件的目录中,出现以下错误

function buildFont(config) {
return webfont({
files: config.inputFiles,
fontName: config.fontName
})
.then(content => content)
.catch(err => {
console.log(err);
});
}
```

错误

node --require babel-core/register ./index.js
already exists

<--- Last few GCs --->

232006 ms: Mark-sweep 1350.0 (1406.9) -> 1349.8 (1406.9) MB, 574.3 / 0.0 ms [allocation failure] [GC in old space requested].
232583 ms: Mark-sweep 1349.8 (1406.9) -> 1349.8 (1406.9) MB, 576.6 / 0.0 ms [allocation failure] [GC in old space requested].
233164 ms: Mark-sweep 1349.8 (1406.9) -> 1349.8 (1403.9) MB, 580.3 / 0.0 ms [last resort gc].
233745 ms: Mark-sweep 1349.8 (1403.9) -> 1349.7 (1403.9) MB, 580.3 / 0.0 ms [last resort gc].


<--- JS stacktrace --->

==== JS stack trace =========================================

2: arguments adaptor frame: 2->1
Security context: 0x4e54c9cfb39 <JS Object>
3: round [/data/projects/hanzi-pinyin-font/node_modules/svg-pathdata/src/SVGPathData.js:12] [pc=0x26e3767b3b09] (this=0x217c839e5e99 <an SVGPathData with map 0x375d0749d7b1>)
4: arguments adaptor frame: 1->0
5: /* anonymous */(aka /* anonymous */) [/data/projects/hanzi-pinyin-font/node_modules/svgicons2svgfont/src/index.js:336] [pc=0x26e376698166]...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [node]
2: 0x109b1dc [node]
3: v8::Utils::ReportApiFailure(char const*, char const*) [node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
5: v8::internal::Factory::NewFixedArray(int, v8::internal::PretenureFlag) [node]
6: v8::internal::DeoptimizationOutputData::New(v8::internal::Isolate*, int, v8::internal::PretenureFlag) [node] [node]
7: v8::internal::FullCodeGenerator::PopulateDeoptimizationData(v8::internal::Handle<v8::internal::Code>) [node]
8: v8::internal::FullCodeGenerator::MakeCode(v8::internal::CompilationInfo*) [node]
9: v8::internal::Compiler::EnsureDeoptimizationSupport(v8::internal::CompilationInfo*) [node]
10: 0xb538d7 [node]
11: 0xb54d4d [node]
12: v8::internal::Compiler::CompileOptimized(v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Compiler::ConcurrencyMode) [node]
13: v8::internal::Runtime_CompileOptimized_Concurrent(int, v8::internal::Object**, v8::internal::Isolate*) [node]
14: 0x26e374e092a7
Aborted
error Command failed with exit code 134.

问题

我该如何解决这个问题?

最佳答案

@evilebottnawi says :

@edouard-lopez due to the large number of files node exceeded the limit memory (512mb) default. You can try increase memory, see http://prestonparry.com/articles/IncreaseNodeJSMemorySize/

关于node.js - 使用 webfont 生成字体 : FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43069581/

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