修改hbuilderx运行配置里的:node启动内存参数,调整为4096或更大
- 发布:2022-12-15 14:32
- 更新:2023-03-25 13:12
- 阅读:3143
产品分类: uniapp/H5
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: windows 10
HBuilderX类型: 正式
HBuilderX版本号: 3.6.13
浏览器平台: Chrome
浏览器版本: chrome
项目创建方式: HBuilderX
操作步骤:
预期结果:
成功发布
成功发布
实际结果:
[HBuilder] 14:31:05.233 <--- Last few GCs --->
[HBuilder] 14:31:05.233 <--- JS stacktrace --->
[HBuilder] 14:31:05.234 #
[HBuilder] 14:31:05.235 # Fatal javascript OOM in GC during deserialization
[HBuilder] 14:31:05.236 #
[HBuilder] 14:31:05.233 <--- Last few GCs --->
[HBuilder] 14:31:05.233 <--- JS stacktrace --->
[HBuilder] 14:31:05.234 #
[HBuilder] 14:31:05.235 # Fatal javascript OOM in GC during deserialization
[HBuilder] 14:31:05.236 #
bug描述:
发布时报错,提示JavaScript heap out of memory。
[HBuilder] 14:25:52.070 <--- Last few GCs --->
[HBuilder] 14:25:52.070 [13840:152DBAE0] 391 ms: Mark-sweep 7.6 (13.1) -> 7.6 (13.1) MB, 7.5 / 0.0 ms (average mu = 0.784, current mu = 0.622) allocation failure GC in old space requested
[HBuilder] 14:25:52.072 [13840:152DBAE0] 435 ms: Mark-sweep 7.7 (13.1) -> 7.6 (13.1) MB, 8.8 / 0.0 ms (average mu = 0.794, current mu = 0.802) allocation failure GC in old space requested
[HBuilder] 14:25:52.074 [13840:152DBAE0] 453 ms: Mark-sweep 7.6 (13.1) -> 7.6 (13.1) MB, 6.7 / 0.0 ms (average mu = 0.743, current mu = 0.629) allocation failure GC in old space requested
[HBuilder] 14:25:52.075 <--- JS stacktrace --->
[HBuilder] 14:25:52.077 FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
修改hbuilderx运行配置里的:node启动内存参数,调整为4096后,仍然无法发布,提示:
[HBuilder] 14:31:05.233 <--- Last few GCs --->
[HBuilder] 14:31:05.233 <--- JS stacktrace --->
[HBuilder] 14:31:05.234 #
[HBuilder] 14:31:05.235 # Fatal javascript OOM in GC during deserialization
[HBuilder] 14:31:05.236 #
2***@qq.com
经过努力,问题已经解决
主要是工具-设置-运行配置 uni-app运行配置-node启动内存参数: 6144
另外我安装的node版本是64位的,14.17.3 ,并在 运行配置-npm路径指向该版本node和npm路径。
是这个问题的回复启发了我:https://ask.dcloud.net.cn/question/160003
PS:奇怪的是,我之前设置 8000+ 或 4096都不行,但设置为6144竟然可以...
2023-01-10 03:48
qhtv1
回复 2***@qq.com: 果然6144可以,这到底是嘛情况啊,这个问题蛋疼的很,升级了云空间,编辑器升级不了,
2023-01-27 12:52