最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Why is my newly created Next.js app with NextAuth and Prisma throwing this error "TypeError: Cannot read p

programmeradmin1浏览0评论

Just started this project, used create-next-app@latest and installed prisma, nextauth and prisma adapter according to latest docs. DB is properly configured and tested, next secret is set, middleware.ts, auth.ts, and prisma.ts copied from official docs, Google oauth creds are set correctly. Here is the error output

Runtime Error


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

Call Stack
10

Hide 10 ignore-listed frame(s)
[project]/node_modules/@prisma/client/runtime/library.js [middleware-edge] (ecmascript)
node_modules/@prisma/client/runtime/library.js (4:6678)
<unknown>
[turbopack]/browser/runtime/base/dev-base.ts (205:21)
runModuleExecutionHooks
[turbopack]/browser/runtime/base/dev-base.ts (265:5)
instantiateModule
[turbopack]/browser/runtime/base/dev-base.ts (203:5)
getOrInstantiateModuleFromParent
[turbopack]/browser/runtime/base/dev-base.ts (132:10)
esmImport
[turbopack]/shared/runtime-utils.ts (214:18)
[project]/node_modules/@auth/prisma-adapter/index.js [middleware-edge] (ecmascript)
node_modules/@auth/prisma-adapter/index.js (1:1)
<unknown>
[turbopack]/browser/runtime/base/dev-base.ts (205:21)
runModuleExecutionHooks
[turbopack]/browser/runtime/base/dev-base.ts (265:5)
instantiateModule
[turbopack]/browser/runtime/base/dev-base.ts (203:5)

Current dependency list:

 "dependencies": {
    "@auth/prisma-adapter": "^2.8.0",
    "@prisma/client": "^6.5.0",
    "next": "^15.2.2",
    "next-auth": "^5.0.0-beta.25",
    "react": "^19",
    "react-dom": "^19"
  },
  "devDependencies": {
    "@eslint/eslintrc": "^3",
    "@types/node": "^20",
    "@types/react": "^19",
    "@types/react-dom": "^19",
    "eslint": "^9",
    "eslint-config-next": "15.2.2",
    "prisma": "^6.5.0",
    "typescript": "^5"
  }

Been digging around searching, chatting with Cursor, changing lots of stuff around, deleted node_modules and reinstalled, generated prisma client again. Nothing is working.

Just started this project, used create-next-app@latest and installed prisma, nextauth and prisma adapter according to latest docs. DB is properly configured and tested, next secret is set, middleware.ts, auth.ts, and prisma.ts copied from official docs, Google oauth creds are set correctly. Here is the error output

Runtime Error


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

Call Stack
10

Hide 10 ignore-listed frame(s)
[project]/node_modules/@prisma/client/runtime/library.js [middleware-edge] (ecmascript)
node_modules/@prisma/client/runtime/library.js (4:6678)
<unknown>
[turbopack]/browser/runtime/base/dev-base.ts (205:21)
runModuleExecutionHooks
[turbopack]/browser/runtime/base/dev-base.ts (265:5)
instantiateModule
[turbopack]/browser/runtime/base/dev-base.ts (203:5)
getOrInstantiateModuleFromParent
[turbopack]/browser/runtime/base/dev-base.ts (132:10)
esmImport
[turbopack]/shared/runtime-utils.ts (214:18)
[project]/node_modules/@auth/prisma-adapter/index.js [middleware-edge] (ecmascript)
node_modules/@auth/prisma-adapter/index.js (1:1)
<unknown>
[turbopack]/browser/runtime/base/dev-base.ts (205:21)
runModuleExecutionHooks
[turbopack]/browser/runtime/base/dev-base.ts (265:5)
instantiateModule
[turbopack]/browser/runtime/base/dev-base.ts (203:5)

Current dependency list:

 "dependencies": {
    "@auth/prisma-adapter": "^2.8.0",
    "@prisma/client": "^6.5.0",
    "next": "^15.2.2",
    "next-auth": "^5.0.0-beta.25",
    "react": "^19",
    "react-dom": "^19"
  },
  "devDependencies": {
    "@eslint/eslintrc": "^3",
    "@types/node": "^20",
    "@types/react": "^19",
    "@types/react-dom": "^19",
    "eslint": "^9",
    "eslint-config-next": "15.2.2",
    "prisma": "^6.5.0",
    "typescript": "^5"
  }

Been digging around searching, chatting with Cursor, changing lots of stuff around, deleted node_modules and reinstalled, generated prisma client again. Nothing is working.

Share Improve this question asked Mar 17 at 21:46 cody blanchardcody blanchard 393 bronze badges 1
  • Where is your JavaScript? Please see: How to create a Minimal, Reproducible Example. – Sergey A Kryukov Commented Mar 17 at 21:49
Add a comment  | 

1 Answer 1

Reset to default 2

Downgrading to @auth/prisma-adapter 2.7.2 should solve it. There is an open issue for this, see https://github/nextauthjs/next-auth/issues/12731

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论