blitz-js / blitz-js/blitz

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './core/init' is not defined by "exports" in next-auth/package.json

Open
#4,171 0 comments 1 reaction 1 assignee Claimed by @siddhsuresh View on GitHub
kind/bug status/blocked
Dominant language
TypeScript
Stars
14.1k
Forks
803
PR merge metrics
No merged PRs in 30d

Description

### What is the problem?

Trying to use blitz wrapper around next-auth around rainbowkit, getting the package path not exported error. Thought 2.0.0-beta.30 would fix, but still have the issue.

### Paste all your error logs here:

```
node ➜ /workspace (devcontainer-clean) $ yarn dev
yarn run v1.22.19
$ blitz dev
Loaded env from /workspace/.env.development
Loaded env from /workspace/.env.local
Loaded env from /workspace/.env
/workspace/node_modules/next/dist/client/index.js
✔ Next.js was successfully patched with a React Suspense fix
✔ Routes manifest was successfully generated
- ready started server on 0.0.0.0:3000, url: http://localhost:3000
- error Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './core/init' is not defined by "exports" in /workspace/node_modules/next-auth/package.json
at new NodeError (node:internal/errors:387:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:365:9)
at packageExportsResolve (node:internal/modules/esm/resolve:649:3)
at resolveExports (node:internal/modules/cjs/loader:554:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:594:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1012:27)
at /workspace/node_modules/next/dist/server/require-hook.js:189:36
at Function.Module._load (node:internal/modules/cjs/loader:871:27)
at Module.require (node:internal/modules/cjs/loader:1098:19)
at require (node:internal/modules/cjs/helpers:108:18) {
type: 'Error',
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```

### Paste all relevant code snippets here:

```
PASTE_HERE (leave the ``` marks)
```

### What are detailed steps to reproduce this?

`blitz dev`

### Run `blitz -v` and paste the output here:

```
node ➜ /workspace (devcontainer-clean) $ yarn blitz -v
yarn run v1.22.19
$ /workspace/node_modules/.bin/blitz -v
Blitz version: 2.0.0-beta.30 (local)
Linux 5.10 | linux-x64 | Node: v16.20.0

Package manager: npm

System:
OS: Linux 5.10 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
CPU: (32) x64 AMD Ryzen 9 3950X 16-Core Processor
Memory: 35.20 GB / 50.14 GB
Shell: 5.2.15 - /bin/bash
Binaries:
Node: 16.20.0 - /tmp/yarn--1688586354561-0.9505729351712635/node
Yarn: 1.22.19 - /tmp/yarn--1688586354561-0.9505729351712635/yarn
npm: 8.19.4 - /usr/local/bin/npm
npmPackages:
@blitzjs/auth: 2.0.0-beta.30 => 2.0.0-beta.30
@blitzjs/next: 2.0.0-beta.30 => 2.0.0-beta.30
@blitzjs/rpc: 2.0.0-beta.30 => 2.0.0-beta.30
@prisma/client: 4.8.1 => 4.8.1
blitz: 2.0.0-beta.30 => 2.0.0-beta.30
next: 13.4.8 => 13.4.8
prisma: 4.8.1 => 4.8.1
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
typescript: 4.9.4 => 4.9.4

Done in 0.37s.
```

### Please include below any other applicable logs and screenshots that show your problem:

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.