You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When minimal nextjs app (15.0.1 & 15.0.2-canary.6 - latest up to today) is being built, these errors appear:
┌ home#build > cache miss, executing 570f9f11bf8e8c82
│
│ > [email protected] build
│ > next build
│
│ ▲ Next.js 15.0.1
│
│ Creating an optimized production build ...
│ ✓ Compiled successfully
│ ✓ Linting and checking validity of types
│ ✓ Collecting page data
│ 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.
│ at Z (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:490)
│ at Xc (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:68:409)
│ at Zc (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:70:210)
│ at Z (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:89)
│ at Zc (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:70:481)
│ at Z (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:89)
│ at $c (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:78:98)
│ at bd (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:77:404)
│ at Z (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:217)
│ at Zc (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:71:479)
│ Error occurred prerendering page "/404". Read more: https://nextjs.org/docs/messages/prerender-error
│ 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.
│ at Z (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:490)
│ at Xc (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:68:409)
│ at Zc (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:70:210)
│ at Z (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:89)
│ at Zc (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:70:481)
│ at Z (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:89)
│ at $c (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:78:98)
│ at bd (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:77:404)
│ at Z (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:217)
│ at Zc (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:71:479)
│ Export encountered an error on /_error: /404, exiting the build.
│ ⨯ Static worker exited with code: 1 and signal: null
│ npm error Lifecycle script `build` failed with error:
│ npm error code 1
│ npm error path C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\apps\home
│ npm error workspace [email protected]
│ npm error location C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\apps\home
│ npm error command failed
│ npm error command C:\WINDOWS\system32\cmd.exe /d /s /c next build
│ command finished with error: command (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\apps\home) C:\Program Files\nodejs\npm.cmd run build exited (1)
└────>
home#build: command (C:\Users\Amin\Documents\Codigo\Pruebas\turbo-next-15\apps\home) C:\Program Files\nodejs\npm.cmd run build exited (1)
This may seem a nextjs error, but it doesn't happen outside of a monorepo handled by turborepo.
It sometimes shows error while prerendering /404, and sometimes while prerendering /500. This WASN'T happening with nextjs@14. This is shown when "Generating static pages (0/4)" is run, after other stages had finished successfully..
Dev execution runs without problems. Running npm run build from apps/home also shows the same errors.
This may seem a nextjs error, but it doesn't happen outside of a monorepo handled by turborepo.
Running npm run build from apps/home also shows the same errors.
So does the error only appear once npm add -D turbo is run in the repository? I removed any turbo installation and configuration in the repro you provided and the error remained when I ran npm run build from apps/home. Could you provide a repro without Turborepo that works as expected?
Verify canary release
Link to code that reproduces this issue
https://github.com/ezeamin/turbo-next-15
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Windows
Which canary version will you have in your reproduction?
[email protected]
Describe the Bug
When minimal nextjs app (15.0.1 & 15.0.2-canary.6 - latest up to today) is being built, these errors appear:
This may seem a nextjs error, but it doesn't happen outside of a monorepo handled by turborepo.
It sometimes shows error while prerendering /404, and sometimes while prerendering /500. This WASN'T happening with nextjs@14. This is shown when "Generating static pages (0/4)" is run, after other stages had finished successfully..
Dev execution runs without problems. Running
npm run build
fromapps/home
also shows the same errors.It also occurs with [email protected], tested on linux and windows.
Expected Behavior
Build finishes without any problems.
To Reproduce
npm i --force
(to avoid react@19 peer deps errors)npm run build
Additional context
I tested this on different PCs, using next 15,15.0.1, and over canary release 15.0.2-canary.6. Also tested on docker.
The text was updated successfully, but these errors were encountered: