You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Next.js 15项目执行bun next build时构建卡住且内存占用过高求助

Next.js 15.1.7 构建卡住问题排查求助

我尝试通过bun next build构建Next.js 15.1.7项目,但在初始阶段就卡住,停留在Creating an optimized production build ...步骤。构建过程中Node进程大量占用内存却无实际进展,但开发模式(next dev)运行正常。

已尝试以下方法均未解决:

  • 删除.next、node_modules目录后重新安装依赖
  • 回退Next.js版本
  • 更换包管理器(yarn、npm)

也未找到相关问题的参考信息,恳请告知可能的问题原因。

项目package.json配置如下:

{
  "name": "app",
  "version": "0.1.0",
  "private": true,
  "type": "module",
  "scripts": {
    "dev": "next dev --turbopack",
    "build": "next build",
    "start": "next start",
    "lint": "next lint",
    "codegen": "graphql-codegen --config graphql.config.ts"
  },
  "dependencies": {
    "@apollo/client": "^3.13.5",
    "@graphql-codegen/cli": "^5.0.5",
    "@graphql-codegen/typescript": "^4.1.6",
    "@graphql-codegen/typescript-operations": "^4.6.0",
    "@graphql-codegen/typescript-react-apollo": "^4.3.2",
    "dotenv": "^16.4.7",
    "graphql": "^16.10.0",
    "next": "15.1.7",
    "postcss": "^8.5.3",
    "react": "^19.0.0",
    "react-dom": "^19.0.0",
    "xml2js": "^0.6.2"
  },
  "devDependencies": {
    "@parcel/watcher": "^2.5.1",
    "@tailwindcss/postcss": "^4.1.3",
    "@tauri-apps/cli": "^2.4.1",
    "@types/node": "^20",
    "@types/react": "^19",
    "@types/react-dom": "^19",
    "@types/xml2js": "^0.4.14",
    "tailwindcss": "^4.1.3",
    "ts-node": "^10.9.2",
    "typescript": "^5"
  }
}

内容的提问来源于stack exchange,提问作者r1dze

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.13 13:40:00