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.js 13 stuck at Creating an optimized production build... when building with swcMinify #42171

Closed
1 task done
tianenpang opened this issue Oct 30, 2022 · 5 comments · Fixed by #42326
Closed
1 task done
Assignees
Labels
bug Issue was opened via the bug report template.

Comments

@tianenpang
Copy link
Contributor

tianenpang commented Oct 30, 2022

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
Binaries:
  Node: 18.12.0
  npm: 8.19.2
  Yarn: 1.22.19
  pnpm: 7.14.1
Relevant packages:
  next: 13.0.0 (13.0.1-canary.1)
  eslint-config-next: 13.0.0
  react: 18.2.0
  react-dom: 18.2.0

What browser are you using? (if relevant)

Chrome 107.0.5304.88

How are you deploying your application? (if relevant)

Vercel

Describe the Bug

Running next build will freeze at Creating an optimized production build... but will build successfully after disable the SWC Minifier in next.config.js.

Similar with issue #37825 but, the build will always be stuck whether the development server is running or not.

Refer to nextui-org/nextui#848

Expected Behavior

Build successfully when using SWC Minifier.

Link to reproduction

https://codesandbox.io/s/quizzical-tess-nnw9js

To Reproduce

CodeSandbox

  1. Fork and add a new terminal then run yarn build

Locally

  1. Export the CodeSandbox project
  2. pnpm install && pnpm build
How to export the project from the CodeSandbox to local?

how-to-export-project-from-codesandbox

@tianenpang tianenpang added the bug Issue was opened via the bug report template. label Oct 30, 2022
@kdy1 kdy1 self-assigned this Nov 1, 2022
@kdy1
Copy link
Member

kdy1 commented Nov 1, 2022

Thank you for creating a repro!
I started working on it

@kdy1
Copy link
Member

kdy1 commented Nov 1, 2022

This should be fixed by swc-project/swc#6300 (Done, waiting for review)

@PaulNext
Copy link

@tianenpang Hey Buddy, how to solve this problem, I use the latest nextjs version and still encounter this problem?

@tianenpang
Copy link
Contributor Author

Hi @0x3Anthony what version of Next.js are you using and which step is the build stuck at?

This issue has been fixed and I couldn't reproduce it using the latest version (13.0.5) of Next.js, if you are using pnpm or yarn you can update the dependencies with the following command, please remove node_modules and re-install them if necessary.

Upgrade deps:

# pnpm
pnpm up -L -i

# yarn
yarn upgrade-interactive --latest

My env:

Binaries:
  Node: 18.12.1
  pnpm: 7.17.1
Relevant packages:
  next: 13.0.5
  eslint-config-next: 13.0.5
  react: 18.2.0
  react-dom: 18.2.0
  @nextui-org/react: 1.0.0-beta.10

@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 31, 2022
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants