Migrating to v5 and got Package subpath './react' is not defined by "exports"
Unanswered
Long-billed Dowitcher posted this in #help-forum
Long-billed DowitcherOP
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './react' is not defined by "exports" in C:\Users\rbdv\Desktoptop-secret\node_modules\next-auth\package.json
5 Replies
Long-billed DowitcherOP
i have no idea to fix
@!=tgt what's your package.json
Long-billed DowitcherOP
Hey:
{
"name": "my-project",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "next build",
"start": "next start",
"lint": "next lint",
"generate": "drizzle-kit generate --name mysql",
"migrations:drop": "drizzle-kit drop --config=drizzle.config.ts",
"push": "drizzle-kit push --config=drizzle.config.ts",
"dev": "run-p dev:*",
"dx": "run-s dev",
"dev:wss": "cross-env PORT=3001 tsx watch src/server/wssDevServer.ts --tsconfig tsconfig.server.json ",
"dev:next": "next dev"
},
"dependencies": {
"@next/env": "^14.2.4",
"@paralleldrive/cuid2": "^2.2.2",
"@tanstack/react-query": "^5.44.0",
"@trpc/client": "11.0.0-rc.401",
"@trpc/next": "^11.0.0-rc.401",
"@trpc/react-query": "^11.0.0-rc.401",
"@trpc/server": "11.0.0-rc.401",
"@types/ws": "^8.5.10",
"clsx": "^2.1.1",
"cookie": "^0.6.0",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"drizzle-kit": "^0.22.7",
"drizzle-orm": "^0.31.2",
"mysql2": "^3.10.0",
"next": "14.2.3",
"next-auth": "4.24.7",
"npm-run-all": "^4.1.5",
"openid-client": "^5.6.5",
"react": "^18",
"react-dom": "^18",
"redis": "^4.6.14",
"superjson": "^2.2.1",
"tailwind-merge": "^2.3.0",
"ws": "^8.17.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.3",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
}
}
{
"name": "my-project",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "next build",
"start": "next start",
"lint": "next lint",
"generate": "drizzle-kit generate --name mysql",
"migrations:drop": "drizzle-kit drop --config=drizzle.config.ts",
"push": "drizzle-kit push --config=drizzle.config.ts",
"dev": "run-p dev:*",
"dx": "run-s dev",
"dev:wss": "cross-env PORT=3001 tsx watch src/server/wssDevServer.ts --tsconfig tsconfig.server.json ",
"dev:next": "next dev"
},
"dependencies": {
"@next/env": "^14.2.4",
"@paralleldrive/cuid2": "^2.2.2",
"@tanstack/react-query": "^5.44.0",
"@trpc/client": "11.0.0-rc.401",
"@trpc/next": "^11.0.0-rc.401",
"@trpc/react-query": "^11.0.0-rc.401",
"@trpc/server": "11.0.0-rc.401",
"@types/ws": "^8.5.10",
"clsx": "^2.1.1",
"cookie": "^0.6.0",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"drizzle-kit": "^0.22.7",
"drizzle-orm": "^0.31.2",
"mysql2": "^3.10.0",
"next": "14.2.3",
"next-auth": "4.24.7",
"npm-run-all": "^4.1.5",
"openid-client": "^5.6.5",
"react": "^18",
"react-dom": "^18",
"redis": "^4.6.14",
"superjson": "^2.2.1",
"tailwind-merge": "^2.3.0",
"ws": "^8.17.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.3",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
}
}
i decreazed next auth version to 4.27 before it was late and didnt found solution for my problem
but before it was the v5