【问题标题】:Next.js application run problem by FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failedNext.js 应用程序运行问题由 FATAL ERROR: In Effective mark-compacts near heap limit 分配失败 【发布时间】:2021-11-25 17:47:48 【问题描述】: 我正在使用 Next.js,但下班后有时我会遇到这个问题。无法运行我的项目。 【问题讨论】: 这能回答你的问题吗? How to fix "FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory" error 标签: javascript next.js 【解决方案1】: 您需要install 最新的 Node 版本或使用 Node Version Manager 切换到您想要的版本。 如果您使用 Maven 插件,您需要在 pom.xml 中将 node_version 更改为您使用的版本,然后再次运行您正在使用的部署命令。您需要更改的 pom.xml 行示例: <configuration> <nodeVersion>v16.11.1</nodeVersion> <npmVersion>6.9.0</npmVersion> </configuration> 【讨论】: