Next.js 14 E-Commerce Website (Server Actions, TypeScript, Deployment, TailwindCSS, Prisma, DaisyUI)
Why Stack Overflow recommends it
Stack Overflow users cite it as the tutorial they were following when they hit Next.js build errors, Next-Auth Google login problems, and Prisma schema errors in their own e-commerce projects.
Recommended by 0 people across 0 different months, 2024 to 2024.
What it is
A nearly six-hour Coding in Flow tutorial that builds and deploys a full-stack Amazon-style e-commerce site with Next.js 14 (app router), Server Actions, TypeScript, Prisma with MongoDB, Next-Auth with Google login, TailwindCSS and DaisyUI. It also covers anonymous carts stored in cookies, request deduplication with React cache, and deployment to Vercel.
What people said
Cites Johan Lindell · 2024-01 · Stack Overflow · on “Problem with the next-auth google provider using prisma and mongodb”
Im having difficulties figuring out how to fix this error: I have a next.js application that is is running on my local machine and im trying to log in with different gmail accounts but when I log in with 1 I cant log in with any other gmail account afterwards that Ive added as test-users in the google console and connected to my next.js application. unique constraint failed on the constraint: users_username_key { message: '\n' + 'Invalid prisma.user.create() invocation:\n' + '\n' + '\n' + 'Unique constraint failed on the constraint: users_username_key', stack: 'PrismaClientKnownRequestError: \n' + 'Invalid prisma.user.create() invocation:\n' + '\n' + '\n' + 'Unique constraint failed on the c
Cites Hamza Khan · 2024-02 · Stack Overflow · on “NextJS and Prisma (MongoDB) Error: Invalid Invocation”
I have been following an online tutorial for a NextJS e-commerce website made by Coding in Flow. Here is the video: [this video] . Everything was going smoothly until I had to update my Prisma schema. After updating, this error showed up: Error: Invalid 'prisma.cart.findUnique()' invocation: Error converting field "updatedAt" of expected non-nullable type "DateTime", found incompatible value of "null". Here is the code in lib/db/cart.ts export async function getCart(): Promise<ShoppingCart | null> { const session = await getServerSession(authOptions); let cart: CartWithProducts | null = null; if (session) { cart = await prisma.cart.findFirst({ where: { userId: session.user.id }, include: { items:
Cites SirArman · 2024-04 · Stack Overflow · on “Route does not match required types of NextJS route, authOptions | NextJS Route Type Error”
I'm encountering an issue with NextJS routes while working on an project (ecommerce), and I could use some guidance in resolving it. To be more specific, it's got to do something with my route.ts file which also works with NextAuth (because of providers like Google). In development everything is working fine, though when I try to build the project, I get errors. Btw, I'm using NextJS 14 and I'm following a YouTube tutorial ( [this video] ), the problem happened at around 5:00:00 when building the project... I also tested it by copying source code (without luck). Now like I said, in dev mode everything is working fine and good. However, when I try to build the project, using npm run build, I get t