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

Panic in SWC on 1 / {2} #9649

Closed
afdw opened this issue Apr 16, 2024 · 0 comments · Fixed by #9650
Closed

Panic in SWC on 1 / {2} #9649

afdw opened this issue Apr 16, 2024 · 0 comments · Fixed by #9650

Comments

@afdw
Copy link

afdw commented Apr 16, 2024

Parcel panics in SWC when building a TypeScript file with 1 / {2} in it.

Reproduction:

user@notebook:/tmp/tmp.OWak309LHY$ echo '1 / {2}' > index.ts
user@notebook:/tmp/tmp.OWak309LHY$ npx parcel build index.ts
Need to install the following packages:
parcel@2.12.0
Ok to proceed? (y) 
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
(node:1061820) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
⠇ Building index.ts...
thread '<unnamed>' panicked at /github/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc_ecma_utils-0.126.2/src/lib.rs:2608:34:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Rayon: detected unexpected panic; aborting
Aborted (core dumped)

Seems to be happening here: https://docs.rs/swc_ecma_utils/0.126.2/src/swc_ecma_utils/lib.rs.html#2608.

Parcel: 2.12.0.
Node.js: 21.4.0.

REPL link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants