gp999
gp999
PPrisma
Created by gp999 on 5/26/2024 in #help-and-questions
PrismaClient is not configured to run in Vercel Edge Functions or Edge Middleware
Auth.ts
import NextAuth from 'next-auth';
import Google from '@auth/core/providers/google';
import {PrismaAdapter} from '@auth/prisma-adapter';
import {PrismaClient} from '@prisma/client';

const prisma = new PrismaClient();
export const {handlers, signIn, signOut, auth} = NextAuth({
adapter: PrismaAdapter(prisma),
providers: [Google]
});
import NextAuth from 'next-auth';
import Google from '@auth/core/providers/google';
import {PrismaAdapter} from '@auth/prisma-adapter';
import {PrismaClient} from '@prisma/client';

const prisma = new PrismaClient();
export const {handlers, signIn, signOut, auth} = NextAuth({
adapter: PrismaAdapter(prisma),
providers: [Google]
});
packages.json
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@auth/prisma-adapter": "^2.1.0",
"@prisma/client": "^5.14.0",
"next": "14.2.3",
"next-auth": "^5.0.0-beta.18",
"react": "^18",
"react-dom": "^18"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.3",
"postcss": "^8",
"prisma": "^5.14.0",
"tailwindcss": "^3.4.1",
"typescript": "^5"
}
}
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@auth/prisma-adapter": "^2.1.0",
"@prisma/client": "^5.14.0",
"next": "14.2.3",
"next-auth": "^5.0.0-beta.18",
"react": "^18",
"react-dom": "^18"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.3",
"postcss": "^8",
"prisma": "^5.14.0",
"tailwindcss": "^3.4.1",
"typescript": "^5"
}
}
3 replies