I'm a relatively new dev and I am working through a tutorial on how to build a fullstack demo app on Vercel using nextjs with Prisma and Postgres (link: https://vercel.com/guides/nextjs-prisma-postgres). I made it about halfway through (up to step 7 in this guide) before things started to break down; I'm not sure how to progress.
After creating a user authentication function I tried to use npm run dev on my terminal, but only got this as the output:
> [email protected] dev
> next
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from C:\Users\myghq\workspace\personal-projects\blogr-nextjs-prisma\.env
C:\Users\myghq\workspace\personal-projects\blogr-nextjs-prisma\node_modules\react-dom\cjs\react-dom-server.node.development.js:320
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
^
TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')
at C:\Users\myghq\workspace\personal-projects\blogr-nextjs-prisma\node_modules\react-dom\cjs\react-dom-server.node.development.js:320:51
at Object.<anonymous> (C:\Users\myghq\workspace\personal-projects\blogr-nextjs-prisma\node_modules\react-dom\cjs\react-dom-server.node.development.js:4382:5)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Module.require (node:internal/modules/cjs/loader:1311:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (C:\Users\myghq\workspace\personal-projects\blogr-nextjs-prisma\node_modules\react-dom\server.node.js:6:20)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
Node.js v20.17.0
I looked around here and a few posts with similar issues said to run the command npm rm react react-dom && npm i -s react react-dom, I did this but only got several dependency errors:
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn peer react@"^17.0.2 || ^18 || ^19" from [email protected]
npm warn node_modules/next-auth
npm warn peer next-auth@"^4" from @next-auth/[email protected]
npm warn node_modules/@next-auth/prisma-adapter
npm warn 1 more (the root project)
npm warn 2 more (react-markdown, styled-jsx)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"17.0.2" from [email protected]
npm warn node_modules/react-dom
npm warn peer react-dom@"^17.0.2 || ^18.0.0-0" from [email protected]
npm warn node_modules/next
npm warn 1 more (next-auth)
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn peer react@"^17.0.2 || ^18 || ^19" from [email protected]
npm warn node_modules/next-auth
npm warn peer next-auth@"^4" from @next-auth/[email protected]
npm warn node_modules/@next-auth/prisma-adapter
npm warn 1 more (the root project)
npm warn 2 more (react-markdown, styled-jsx)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"17.0.2" from [email protected]
npm warn node_modules/react-dom
npm warn peer react-dom@"^17.0.2 || ^18.0.0-0" from [email protected]
npm warn node_modules/next
npm warn 1 more (next-auth)
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn peer react@"^17.0.2 || ^18 || ^19" from [email protected]
npm warn node_modules/next-auth
npm warn peer next-auth@"^4" from @next-auth/[email protected]
npm warn node_modules/@next-auth/prisma-adapter
npm warn 1 more (the root project)
npm warn 2 more (react-markdown, styled-jsx)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"17.0.2" from [email protected]
npm warn node_modules/react-dom
npm warn peer react-dom@"^17.0.2 || ^18.0.0-0" from [email protected]
npm warn node_modules/next
npm warn 1 more (next-auth)
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/next
npm error next@"12.0.10" from the root project
npm error
npm error Could not resolve dependency:
npm error peer next@"^12.2.5 || ^13 || ^14 || ^15" from [email protected]
npm error node_modules/next-auth
npm error peer next-auth@"^4" from @next-auth/[email protected]
npm error node_modules/@next-auth/prisma-adapter
npm error @next-auth/prisma-adapter@"^1.0.7" from the root project
npm error next-auth@"^4.24.11" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/next
npm error peer next@"^12.2.5 || ^13 || ^14 || ^15" from [email protected]
npm error node_modules/next-auth
npm error peer next-auth@"^4" from @next-auth/[email protected]
npm error node_modules/@next-auth/prisma-adapter
npm error @next-auth/prisma-adapter@"^1.0.7" from the root project
npm error next-auth@"^4.24.11" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\Users\myghq\AppData\Local\npm-cache\_logs\2025-04-12T15_50_38_299Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\myghq\AppData\Local\npm-cache\_logs\2025-04-12T15_50_38_299Z-debug-0.log
I know that's a lot there; I'm not crazy familiar with a lot of these installations (a lot were done through the school I'm going to and they didn't really explain a whole lot in terms of installation, just sort of 'run this command' without explanation).
I did have to run a few npm install @latest on a few things where I could tell it had an outdated version of something (sorry, I don't remember which ones exactly as I was too excited and flew through this too fast) but with these errors above I can't tell exactly what it's looking for or what is installed incorrectly.