Closed7

CloudflarePages でホスティングしている Next.js を 14 にする

naporitannaporitan

まずコケる

Image from Gyazo

15:54:58.485 ▲ unhandledRejection ReferenceError: Headers is not defined
15:54:58.486 ▲ at /opt/buildhome/repo/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:14:8846
15:54:58.486 ▲ at /opt/buildhome/repo/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:14:41308
15:54:58.486 ▲ at Object.<anonymous> (/opt/buildhome/repo/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:14:41329)
15:54:58.487 ▲ at Module._compile (node:internal/modules/cjs/loader:1198:14)
15:54:58.487 ▲ at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
15:54:58.487 ▲ at Module.load (node:internal/modules/cjs/loader:1076:32)
15:54:58.487 ▲ at Function.Module._load (node:internal/modules/cjs/loader:911:12)
15:54:58.487 ▲ at Module.require (node:internal/modules/cjs/loader:1100:19)
15:54:58.487 ▲ at Module.mod.require (/opt/buildhome/repo/node_modules/next/dist/server/require-hook.js:64:28)
15:54:58.487 ▲ at require (node:internal/modules/cjs/helpers:108:18)
15:54:58.514 ▲ Error: Command "npm run build" exited with 1
15:54:58.590
15:54:58.590 ⚡️ The Vercel build (npx vercel build) command failed. For more details see the Vercel logs above.
15:54:58.591 ⚡️ If you need help solving the issue, refer to the Vercel or Next.js documentation or their repositories.
15:54:58.591
15:54:58.614 Failed: build command exited with code: 1
15:54:59.743 Failed: error occurred while running build command

このスクラップは2023/10/31にクローズされました