I've just cloned the repo and did this:
npm install
npx prisma db push
npm run dev
The main page showed up for a split second before this error got displayed:
Here's the full error text:
Unhandled Runtime Error
TypeError: Cannot read properties of undefined (reading 'call')
Call Stack
options.factory
file:///D:/Workspace/tmp/nextjs-mysql-auth-starter/.next/static/chunks/webpack.js (710:31)
__webpack_require__
/_next/static/chunks/webpack.js (37:33)
fn
file:///D:/Workspace/tmp/nextjs-mysql-auth-starter/.next/static/chunks/webpack.js (365:21)
require
node_modules\next\dist\client\image.js (7:15)
./node_modules/next/dist/client/image.js
file:///D:/Workspace/tmp/nextjs-mysql-auth-starter/.next/static/chunks/app/page.js (50:1)
options.factory
/_next/static/chunks/webpack.js (710:31)
__webpack_require__
file:///D:/Workspace/tmp/nextjs-mysql-auth-starter/.next/static/chunks/webpack.js (37:33)
fn
/_next/static/chunks/webpack.js (365:21)
__webpack_require__
node_modules\next\dist\client\app-index.js (26:16)
requireModule
node_modules\next\dist\compiled\react-server-dom-webpack\client.js (142:0)
initializeModuleChunk
node_modules\next\dist\compiled\react-server-dom-webpack\client.js (427:0)
readChunk
node_modules\next\dist\compiled\react-server-dom-webpack\client.js (252:0)
mountLazyComponent
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (23079:0)
beginWork
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (24792:0)
beginWork$1
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (32185:0)
performUnitOfWork
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (31082:0)
workLoopSync
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (30891:0)
renderRootSync
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (30856:0)
recoverFromConcurrentError
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (30109:0)
performConcurrentWorkOnRoot
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (29996:0)
workLoop
node_modules\next\dist\compiled\scheduler\index.js (10:3921)
flushWork
node_modules\next\dist\compiled\scheduler\index.js (10:3629)
MessagePort.performWorkUntilDeadline
node_modules\next\dist\compiled\scheduler\index.js (10:1811)
Here's the server log:
...
event - compiled client and server successfully in 3.2s (658 modules)
[next-auth][warn][EXPERIMENTAL_API]
`unstable_getServerSession` is experimental and may be removed or changed in the future, as the name suggested.
https://next-auth.js.org/configuration/nextjs#unstable_getServerSession}
https://next-auth.js.org/warnings#EXPERIMENTAL_API
[next-auth][warn][EXPERIMENTAL_API]
`unstable_getServerSession` is used in a React Server Component.
https://next-auth.js.org/configuration/nextjs#unstable_getServerSession}
https://next-auth.js.org/warnings#EXPERIMENTAL_API
[next-auth][warn][NEXTAUTH_URL]
https://next-auth.js.org/warnings#nextauth_url
Environment info:
- OS: Windows 11
- Node: v18.12.1
But if I run the build and do npm run start
, it works without an issue 🤔