-
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
New project npx next build error #72878
Comments
I tried with different NodeJS versions, v21.7.3 and v22.11.0 works fine. |
I have this same issue with a brand new project with no edits just
I'm on node version v23.2.0 |
Also on node version v23.2.0 |
Remove the → from the text in the last link (Go to nextjs.org → becomes Go to nextjs.org) and it seems to compile fine. Possibly improper escaping of unicode character. I created a const: and then replaced the line: Go to nextjs.org → with: {goto} and it built as well. Take what I say with a grain of salt, im very new to typescript, react, and nextjs. It only happens on build so perhaps there is a problem with a minimizer or other tool that webpack is configured to use?! |
That is true. It does work if you remove the "→" from the default page. So that is a good hint I'm not using the that char or any other that might need encoding on my page though. I am using zod and react-hook-form and the only JSON on it is a valid zod spec. If I remove the form and zod spec it builds and it all builds fine in dev mode. Right now I'm getting
|
maybe this helps i have nextjs 14 latest and the same problems with the build. 23.2 breaks a few packages that use json trough webpack (date-fns) #55826 downgraded my node installation from 23.2 to 20.18 et voila |
Link to the code that reproduces this issue
https://github.com/RobertKoval/issue_nextjs
To Reproduce
npx create-next-app@latest
npx next build
Current vs. Expected behavior
I expected the project to compile, but instead, I encountered an error:
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 Available memory (MB): 16384 Available CPU cores: 10 Binaries: Node: 23.2.0 npm: 10.9.0 Yarn: 1.22.22 pnpm: 9.4.0 Relevant Packages: next: 15.0.3 // Latest available version is detected (15.0.3). eslint-config-next: 15.0.3 react: 19.0.0-rc-66855b96-20241106 react-dom: 19.0.0-rc-66855b96-20241106 typescript: 5.6.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
create-next-app, Developer Experience, Webpack
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: