美文网首页
HbuilderX打包报内存泄露的问题解决

HbuilderX打包报内存泄露的问题解决

作者: 周星星的学习笔记 | 来源:发表于2023-03-19 18:15 被阅读0次

今天在用HbuilderX打H5包的时候,报错了,找了很多资料不知道啥原因,后来终于解决了!O(∩_∩)O哈哈~,报错信息如下:

[HBuilder] 17:03:46.273 <--- Last few GCs --->
[HBuilder] 17:03:46.287 [1389:0x7fa581a00000] 685856 ms: Mark-sweep 2013.0 (2082.7) -> 1998.3 (2083.7) MB, 1757.0 / 0.1 ms (average mu = 0.097, current mu = 0.023) allocation failure scavenge might not succeed
[HBuilder] 17:03:46.319 [1389:0x7fa581a00000] 687472 ms: Mark-sweep 2014.3 (2083.9) -> 1999.5 (2085.2) MB, 1567.1 / 0.1 ms (average mu = 0.065, current mu = 0.030) allocation failure scavenge might not succeed
[HBuilder] 17:03:46.335 <--- JS stacktrace --->
[HBuilder] 17:03:46.351 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
17:03:46.380 1: 0x105edf205 node::Abort() (.cold.1)
17:03:46.391 2: 0x104be04d9 node::Abort()
17:03:46.392 3: 0x104be064f node::OnFatalError(char const*, char const*)
17:03:46.405 4: 0x104d53b07 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool)

一、解决方法

1.打开偏好设置

打开偏好设置

2.设置node启动内存参数

node启动内存参数设置大一点

3.设置好参数之后再打包

相关文章

网友评论

      本文标题:HbuilderX打包报内存泄露的问题解决

      本文链接:https://www.haomeiwen.com/subject/dduyrdtx.html