-
Notifications
You must be signed in to change notification settings - Fork 27k
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 on Vercel deployments after upgrading to 13.4 #49261
Comments
FYI - related discussion - #49251 |
@laubonghaudoi Ran into the same issue you're describing with a previously working build. This is silly, but did you make sure to yarn/npm install again after you reverted the version in your package.json? My build seems to be running again on Next 13.3.4 but is broken in 13.4 |
I was facing a similar issue after trying to upgrade locally for a Next app using a custom server. Adding the following to
|
I had also the same issue when I did the migration to Next 13.4. I added the flag given by @benjwexler , and now it deploy without any issue.
|
Thank you!! |
Thanks for the config tips, all. Next needs to add that to the |
- Workaround for vercel/next.js#49261
* ⬆️ Bump next from 13.2.4 to 13.4.0 Bumps [next](https://github.com/vercel/next.js) from 13.2.4 to 13.4.0. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](vercel/next.js@v13.2.4...v13.4.0) --- updated-dependencies: - dependency-name: next dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * 🐛 Opt-out of appDir - Workaround for vercel/next.js#49261 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nick Oates <nick@nickoates.com>
Have the same issue after upgrade to nextjs 13.4.0 (from 13.3.4) - no app dir - no type module The example repo is: https://github.com/belgattitude/nextjs-monorepo-example (branch main) The ci passes (https://github.com/belgattitude/nextjs-monorepo-example/actions/workflows/ci-nextjs-app.yml), vercel just started to break after upgrade. If you want to try on vercel, you'll have to add ENABLE_EXPERIMENTAL_COREPACK=1 in the vercel env. The deployment url: https://monorepo-nextjs-app.vercel.app/ Open to help if needed PS:
|
It seems like this issue is happening again in 13.4.2. The error message is different tho, this time it's Type error: 'MyComponent' cannot be used as a JSX component.
Its element type 'ReactElement<any, any> | Component<{}, any, any> | null' is not a valid JSX element. Local build is fine but Vercel deployment fails, same as 13.4.0 |
I am also getting const Payments = dynamic(() => import("@/components/Account/Payments"), {
loading: () => <Loading />,
});
...
<AccountLayout curPage={curPage}>
{
{
payments: <Payments />,
...
}[curPage]
}
</AccountLayout> Error:
|
Hey, I am facing the same issue in the latest build of nextjs. I have listed the issues and examples in greater detail on the Tanstack issues, check it out here. Basically, it is not working in a mono repo created using nx, the build is failing. |
We are having the same issue as @MathurAditya724 using NX as well (>=v16). Our error is of the "Cannot read properties of null (reading 'useEffect')" variant and we are also using Tanstack Query (which is how I got to this issue). When I downgrade to Next 13.3.4 everything works correctly, but anything past 13.4.x generates the error. |
Hey, just upgrade your |
updated to |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 Binaries: Node: 16.13.2 npm: 9.6.4 Yarn: 3.4.1 pnpm: 7.21.0 Relevant packages: next: 13.4.0 eslint-config-next: 13.4.0 react: 18.2.0 react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue
none
To Reproduce
Upgrade
next
from^13.3.4
tp^13.4.0
. The project is usingpages/
, not usingapp/
dir nor turbopack.Describe the Bug
I just updated the nextJS version from 13.3 to 13.4 without change anything in my codebase. The local build is successful without any errors, but when deployed on Vercel, I got hundreds of lines of error like
I speculate that this is caused by my components not being specified as client components. But I am not using the
app/
directory, I am only using the/pages
. Does that mean I need to specify client components even if I am using /pages? I tried adding 'use client' to the top of my component files and the error still persists.The local builds are successful without any errors, this only happens on Vercel deployments.
Expected Behavior
Build should be successful with no error.
Which browser are you using? (if relevant)
irrelevant
How are you deploying your application? (if relevant)
Vercel
The text was updated successfully, but these errors were encountered: