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

Build error with Next.js 15 in monorepo #72899

Open
omarshehab221 opened this issue Nov 17, 2024 · 3 comments
Open

Build error with Next.js 15 in monorepo #72899

omarshehab221 opened this issue Nov 17, 2024 · 3 comments
Labels
bug Issue was opened via the bug report template. create-next-app Related to our CLI tool for quickly starting a new Next.js application. Output (export/standalone) Related to the the output option in `next.config.js`. Turbopack Related to Turbopack with Next.js.

Comments

@omarshehab221
Copy link

Link to the code that reproduces this issue

https://github.com/omarshehab221/DoomUI

To Reproduce

Just clone the repo and try to build the apps/template or the apps/playground (I made sure not change anything in this one from what bun create next-app@latest created to test the error)

Current vs. Expected behavior

I was trying to build the apps/template without that much change from what bun create next-app@latest created. I expected it to build fine specially that it passed the optimized build and the linting phases. It throws this error in the Collecting pages data phase: "Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7B%24%24typeof%2C%20type%2C%20key%2C%20ref%2C%20props%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings."

I created apps/playground and made sure not to change any of its code just to be sure the issue exists and had the same problem.

This usually doesn't happen when I'm not working in a monorepo

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
  Available memory (MB): 16272
  Available CPU cores: 4
Binaries:
  Node: 18.18.0
  npm: 10.5.0
  Yarn: 1.22.22
  pnpm: 9.9.0
  bun: 1.1.33
Relevant Packages:
  next: 15.0.3
  eslint-config-next: 15.0.3
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.6.3
Next.js Config:
  output: N/A

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

create-next-app, Output (export/standalone), Turbopack

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

next build (local)

Additional context

I created apps/playground and didn't change it's code just to test this

@omarshehab221 omarshehab221 added the bug Issue was opened via the bug report template. label Nov 17, 2024
@github-actions github-actions bot added create-next-app Related to our CLI tool for quickly starting a new Next.js application. Output (export/standalone) Related to the the output option in `next.config.js`. Turbopack Related to Turbopack with Next.js. labels Nov 17, 2024
@body20002
Copy link

A workaround for this issue is to not use turbopack,
this bug was open in turborepo/#6298 before moving turbopack to vercel/nextjs repo.

@gameriff
Copy link

A workaround for this issue is to not use turbopack, this bug was open in turborepo/#6298 before moving turbopack to vercel/nextjs repo.

The issue you reference seems to be in regard to using turbopack for dev, but this issue (which I am also experiencing) is referring to running a full build in a monorepo, if I am not mistaken.

@body20002
Copy link

@gameriff yeah sorry I didn't try to build before commenting and I was facing issues with a monorepo setup with nextjs 15, building seems to be fine on my end but again I'm not using turborepo just bun workspaces.

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. create-next-app Related to our CLI tool for quickly starting a new Next.js application. Output (export/standalone) Related to the the output option in `next.config.js`. Turbopack Related to Turbopack with Next.js.
Projects
None yet
Development

No branches or pull requests

3 participants