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 build fails on an object with a key contains U+30FB #65237

Closed
mythosil opened this issue May 1, 2024 · 2 comments · Fixed by vercel/turborepo#8097
Closed

next build fails on an object with a key contains U+30FB #65237

mythosil opened this issue May 1, 2024 · 2 comments · Fixed by vercel/turborepo#8097
Assignees
Labels
bug Issue was opened via the bug report template. linear: next Confirmed issue that is tracked by the Next.js team. locked SWC Related to minification/transpilation in Next.js.

Comments

@mythosil
Copy link

mythosil commented May 1, 2024

Link to the code that reproduces this issue

https://github.com/mythosil/nextjs-issue-20240501/blob/master/pages/index.js

To Reproduce

  1. npm install
  2. npm run build

Current vs. Expected behavior

When I build the project for reproduction with Node v20.11.0, I get:

> Build error occurred
Error: Failed to collect page data for /

When I build the project with Node v20.12.2, I don't get any errors, but browsers throw Uncaught SyntaxError: Invalid or unexpected token when I access the app.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 22.5.0: Thu Jun  8 22:22:23 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6020
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 20.11.0
  npm: 10.2.4
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.3 // Latest available version is detected (14.2.3).
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: N/A
Next.js Config:
  output: N/A

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

SWC

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

next build (local)

Additional context

It seems that minification removes quotes unexpectedly.
swcMinify: false makes the build work properly.

This problem happens when an object has a key with "・" (U+30FB KATAKANA MIDDLEDOT), like { 'a・': '' } .
Similar issue here: evanw/esbuild#1599

@mythosil mythosil added the bug Issue was opened via the bug report template. label May 1, 2024
@github-actions github-actions bot added the SWC Related to minification/transpilation in Next.js. label May 1, 2024
@kdy1 kdy1 self-assigned this May 15, 2024
@kdy1 kdy1 added the linear: turbopack Confirmed issue that is tracked by the Turbopack team. label May 15, 2024
@kdy1
Copy link
Member

kdy1 commented May 15, 2024

It looks like swc-project/swc#8940, and it will be fixed by the next swc_core update

@timneutkens timneutkens added linear: next Confirmed issue that is tracked by the Next.js team. and removed linear: turbopack Confirmed issue that is tracked by the Turbopack team. labels May 15, 2024
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2024
Neosoulink pushed a commit to Neosoulink/turbo that referenced this issue Jun 14, 2024
### Description


 - Closes PACK-3042
 - Closes NEXT-3241
 - Closes NEXT-3242
 - Closes vercel/next.js#46887
 - Closes vercel/next.js#65064
 - Closes vercel/next.js#65066
 - Closes vercel/next.js#65237

### Testing Instructions

See [next.js counterpart](vercel/next.js#65450)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. linear: next Confirmed issue that is tracked by the Next.js team. locked SWC Related to minification/transpilation in Next.js.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants