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

swc broken on nextjs 12.0.3 with @toast-ui/react-editor #31077

Closed
ghost opened this issue Nov 6, 2021 · 2 comments · Fixed by #33461
Closed

swc broken on nextjs 12.0.3 with @toast-ui/react-editor #31077

ghost opened this issue Nov 6, 2021 · 2 comments · Fixed by #33461

Comments

@ghost
Copy link

ghost commented Nov 6, 2021

What version of Next.js are you using?

12.0.3

What version of Node.js are you using?

v16.13.0

What browser are you using?

Chrome

What operating system are you using?

macOS

How are you deploying your application?

next build

Describe the Bug

when i add @toast-ui/react-editor to my project

i change i config swcMinify: true,

then i run next build

i got a error:

yarn run v1.22.17
$ next build
warn  - SWC minify beta enabled. https://nextjs.org/docs/messages/swc-minify-enabled
info  - Checking validity of types  
info  - Creating an optimized production build .thread '<unnamed>' panicked at 'Infinite loop detected (current pass = 101)', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc_ecma_minifier-0.48.4/src/compress/mod.rs:261:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
error Command failed with signal "SIGABRT".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


Expected Behavior

no error

To Reproduce

  1. clone https://github.com/find456789/tmp_nextjs12_swc
  2. yarn or npm i
  3. yarn build or npm run build

you will got the error

@ghost ghost added the bug Issue was opened via the bug report template. label Nov 6, 2021
@timneutkens timneutkens added area: SWC Minify and removed bug Issue was opened via the bug report template. labels Nov 8, 2021
@mulib
Copy link

mulib commented Dec 13, 2021

any updates on this one? im getting the same error (im not using @toast-ui/react-editor, dont have any way to know what package cause this error)

this is the trace im getting with RUST_BACKTRACE=full

[PWA] Compile server
[PWA] Compile client (static)
[PWA] Auto register service worker with: /Users/mulibachar/repos/zira-web/node_modules/next-pwa/register.js
[PWA] Service worker: /Users/mulibachar/repos/zira-web/public/sw.js
[PWA] url: /sw.js
[PWA] scope: /
info - Creating an optimized production build .thread '' panicked at 'Infinite loop detected (current pass = 101)', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc_ecma_minifier-0.48.4/src/compress/mod.rs:261:13
stack backtrace:
0: 0x60eb08574 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf479dd487b623c5f
1: 0x60eb2866c - core::fmt::write::h8160330c41daaf61
2: 0x60eb03eda - std::io::Write::write_fmt::h2c9315db2d27960e
3: 0x60eb09dcf - std::panicking::default_hook::{{closure}}::h583fb652f5c58b48
4: 0x60eb09976 - std::panicking::default_hook::h1d01fcd3894dae52
5: 0x60eb0a4d0 - std::panicking::rust_panic_with_hook::h013ca0228b580e94
6: 0x60eb09f6e - std::panicking::begin_panic_handler::{{closure}}::h851d3f5f9017436b
7: 0x60eb08a07 - std::sys_common::backtrace::__rust_end_short_backtrace::h83695ce1e08cc610
8: 0x60eb09eda - _rust_begin_unwind
9: 0x60eb979cb - std::panicking::begin_panic_fmt::hc639b8142a2a7ab1
10: 0x60d9414fb - <swc_ecma_minifier::compress::Compressor as swc_ecma_visit::VisitMut>::visit_mut_module::hdba8b1a4fd06da29
11: 0x60d982cba - swc_ecma_minifier::optimize::ha9b90317cda386d4
12: 0x60d9b207c - swc::Compiler::minify::h723464b5d3136776
13: 0x60d2be7a3 - swc::try_with_handler::h1bab6c73ec7d2573
14: 0x60d4a162c - <next_swc::minify::MinifyTask as napi::task::Task>::compute::hd8d4d00462d0dbf3
15: 0x60d511f69 - napi::async_work::execute::h60709910368331e1
info - Creating an optimized production build .. 16: 0x1009f0bda - _worker
17: 0x7fff203f98fc - __pthread_start
fatal runtime error: failed to initiate panic, error 5
Abort trap: 6
~/repos/zira-web [Q42021] $

kdy1 added a commit to kdy1/swc that referenced this issue Jan 12, 2022
kdy1 added a commit to kdy1/swc that referenced this issue Jan 19, 2022
kdy1 added a commit to kdy1/swc that referenced this issue Jan 19, 2022
@kodiakhq kodiakhq bot closed this as completed in #33461 Jan 19, 2022
kodiakhq bot pushed a commit that referenced this issue Jan 19, 2022
natew pushed a commit to natew/next.js that referenced this issue Feb 16, 2022
@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 Feb 18, 2022
nevilm-lt pushed a commit to nevilm-lt/next.js that referenced this issue Apr 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants