Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next dev --turbo error when using bun.lock text lockfile #74082

Open
matallui opened this issue Dec 18, 2024 · 1 comment · May be fixed by #74056
Open

next dev --turbo error when using bun.lock text lockfile #74082

matallui opened this issue Dec 18, 2024 · 1 comment · May be fixed by #74056
Labels
bug Issue was opened via the bug report template. Turbopack Related to Turbopack with Next.js.

Comments

@matallui
Copy link

Link to the code that reproduces this issue

https://github.com/matallui/bug-next-bun-text-lockfile

To Reproduce

  1. Create a new turborepo monorepo with bun create turbo@latest
  2. Delete bun.lockb lockfile
  3. Run bun i --save-text-lockfile in the root of the monorepo
  4. cd into apps/web and run bun run dev

OR

  1. Clone repo above
  2. Install dependencies with bun i
  3. cd apps/web && bun run dev

Current vs. Expected behavior

Expected

Next dev server to start and be accessible on localhost:3000

Current

   ▲ Next.js 15.1.1 (Turbopack)
   - Local:        http://localhost:3000
   - Network:      http://127.0.2.2:3000
   - Environments: .env

 ✓ Starting...
FATAL: An unexpected Turbopack error occurred. Please report the content of /var/folders/ks/8zn35t35521c9xvbtl9xt_7c0000gn/T/next-panic-18ab5faad2f00c774e96d73fa060eb8.log, along with a description of what you were doing when the error occurred, to https://github.com/vercel/next.js/issues/new
[Error [TurbopackInternalError]: Next.js package not found

Debug info:
- Execution of get_entrypoints_with_issues failed
- Execution of Project::entrypoints failed
- Execution of AppProject::routes failed
- Execution of directory_tree_to_entrypoints_internal failed
- Execution of directory_tree_to_loader_tree failed
- Execution of *FileSystemPath::join failed
- Execution of get_next_package failed
- Next.js package not found]

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.2.0: Fri Dec  6 19:02:41 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6030
  Available memory (MB): 18432
  Available CPU cores: 11
Binaries:
  Node: 20.18.1
  npm: 10.8.2
  Yarn: 1.22.22
  pnpm: 9.15.0
Relevant Packages:
  next: 15.1.1
  eslint-config-next: 15.1.1
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.7.2
Next.js Config:
  output: N/A


### Which area(s) are affected? (Select all that apply)

Turbopack

### Which stage(s) are affected? (Select all that apply)

next dev (local)

### Additional context

- If I run `next dev` without using Turbopack, it all seems to work fine
- Bun's text lockfile (bun.lock) was introduced a day or two ago with bun v1.1.39
@matallui matallui added the bug Issue was opened via the bug report template. label Dec 18, 2024
@github-actions github-actions bot added the Turbopack Related to Turbopack with Next.js. label Dec 18, 2024
@RiskyMH
Copy link
Contributor

RiskyMH commented Dec 19, 2024

i believe i fixed this in #74056 (basically next.js is looking for "root" dir using package manager lock files)

a simple workarround is make empty bun.lockb file or one of the many other options

@RiskyMH RiskyMH linked a pull request Dec 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Turbopack Related to Turbopack with Next.js.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants