Vue自动编译时 内存 泄漏的解决办法
程序员文章站
2022-04-17 08:03:21
...
错误描述
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 000000013F72F04A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+5114
2: 000000013F70A0C6 node::MakeCallback+4518
3: 000000013F70AA30 node_module_register+2032
4: 000000013F9920EE v8::internal::FatalProcessOutOfMemory+846
5: 000000013F99201F v8::internal::FatalProcessOutOfMemory+639
6: 000000013FEB2BC4 v8::internal::Heap::MaxHeapGrowingFactor+9556
7: 000000013FEA9C46 v8::internal::ScavengeJob::operator=+24310
8: 000000013FEA829C v8::internal::ScavengeJob::operator=+17740
9: 000000013FEB0F87 v8::internal::Heap::MaxHeapGrowingFactor+2327
10: 000000013FEB1006 v8::internal::Heap::MaxHeapGrowingFactor+2454
11: 000000013FA6CDB7 v8::internal::Factory::NewFillerObject+55
12: 000000013FB02CC6 v8::internal::WasmJs::Install+29414
13: 000002698BFDC5C1
error Command failed with exit code 134.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Process finished with exit code 134
解决办法
在 \node_modules.bin\webpack-dev-server.cmd 加以下红色配置,暂可解决
@IF EXIST “%~dp0\node.exe” (
“%~dp0\node.exe” "–max_old_space_size=4096" “%~dp0…[email protected]@webpack-dev-server\bin\webpack-dev-server.js” %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node “–max_old_space_size=4096” “%~dp0…[email protected]@webpack-dev-server\bin\webpack-dev-server.js” %*
)
链接: link.