Next.js Discord

Discord Forum

TypeError: Cannot read properties of undefined (reading 'ReactJsxRuntime')

Answered
Kez posted this in #help-forum
Open in Discord
KezOP
Using Bun & Next 13.5.6

Running either next build or bunx next build locally works fine, but the build on Vercel fails with the following error:

TypeError: Cannot read properties of undefined (reading 'ReactJsxRuntime')
    at 12616 (/vercel/path0/.next/server/chunks/977.js:1:110651)
    at __webpack_require__ (/vercel/path0/.next/server/webpack-runtime.js:1:146)
    at 10057 (/vercel/path0/.next/server/chunks/556.js:1:7630)
    at Function.__webpack_require__ (/vercel/path0/.next/server/webpack-runtime.js:1:146)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async collectGenerateParams (/vercel/path0/node_modules/next-auth/node_modules/next/dist/build/utils.js:858:17)
    at async /vercel/path0/node_modules/next-auth/node_modules/next/dist/build/utils.js:1074:17
    at async Span.traceAsyncFn (/vercel/path0/node_modules/next-auth/node_modules/next/dist/trace/trace.js:105:20)

> Build error occurred
Error: Failed to collect page data for /_not-found
    at /vercel/path0/node_modules/next-auth/node_modules/next/dist/build/utils.js:1178:15
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  type: 'Error'
}
error: script "build" exited with code 1 (SIGHUP)
Error: Command "bun run build" exited with 1


I've tried dozens of things but I can't seem to figure out the problem.
Answered by riský
bun still doesn't have support yet (ie working with nextjs): https://nextjs-forum.com/post/1155146640605315072#message-1163365424025587754
View full answer

2 Replies

bun still doesn't have support yet (ie working with nextjs): https://nextjs-forum.com/post/1155146640605315072#message-1163365424025587754
Answer
KezOP
That's what I thought but hoped not to hear, thank you. 🫡