FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

GitHub Actions 执行Node命令打包一个项目,报错FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory原因:GitHub Actions Nodejs运行时环境使用内存是...

2024年11月3日
89字

GitHub Actions 执行Node命令打包一个项目,报错FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

原因:GitHub Actions Nodejs运行时环境使用内存是有大小限制的,64位系统约为1.4GB,32位系统约为0.7GB,该次构建内存使用超出了默认大小

解决:export NODE_OPTIONS="--max-old-space-size=4096"

文章评论区

欢迎留言交流

未登录,请先注册或登录后发表评论。

Leave comment