swc: @swc/wasm-typescript exits on Windows arm64 when fed with certain syntax
Describe the bug
After investigation in https://github.com/nodejs/node/issues/54645 I finally came to conclusion that on Windows arm64 (this particular configuration, not Windows other than arm64, not arm64 other than Windows), swc fails to transform certain syntax and just silently exits instead.
Input code
export function foo() {
if (false) {
}
return 'foo';
};
Config
n/a
Playground link (or link to the minimal reproduction)
https://gist.github.com/wojtekmaj/c37e1eb07676cde83e5201ade8b7f02f
SWC Info output
Operating System:
Platform: win32
Arch: arm64
Machine Type: unknown
Version: Windows 11 Home
CPU: (12 cores)
Models: Snapdragon(R) X 12-core X1E80100 @ 3.40 GHz
Binaries:
Node: 22.7.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant Packages:
@swc/core: N/A
@swc/helpers: N/A
@swc/types: N/A
SWC Config:
output: N/A
.swcrc path: N/A
Next.js info:
output: N/A
Expected behavior
Code should be transformed, types should be stripped, swc should not silently exit.
Actual behavior
swc silently exists, and neither the output, nor “End 2” console.log (see playground link) never appears on the screen.
Version
1.7.22
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 41 (34 by maintainers)
It’s my first encounter with swc, so apologies if my diagnosis so far aren’t the best, but I’ll do my best to help out. The hardware is yours to experiment on 😄
I got an arm64 windows device. My mother had one 👍 I’ll fix this issue after Chuseok holiday(through Wednesday)
@marco-ippolito I created a separate repository to test it using Github Actions. Repo: https://github.com/kdy1/swc-win-arm64
I’ll monitor this to ensure that it does not fail with unrelated stuffs
I managed to install VS and rust on it. I’ll try later today.