swc-project / swc-project/swc-node
Sementation fault when running @swc-node/register/esm on GNU/Linux (Alpine Linux not affected)
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 95
- Avg merge
- 14d 11h
- Merged PRs (30d)
- 1
Description
See reproduction here: https://github.com/joshunrau/segfault
package.json
{
"name": "app",
"type": "module",
"dependencies": {
"@swc-node/register": "^1.10.10",
"@swc/core": "^1.11.16"
},
"devDependencies": {
"@types/node": "22.x"
}
}
index.js
import * as module from 'node:module';
module.register('@swc-node/register/esm', import.meta.url);
dnpws15% node index.js
zsh: segmentation fault (core dumped) node index.js
dnpws15% uname -a
Linux dnpws15 6.12.20-x64v3-xanmod1 #0~20250323.gf5cd360 SMP PREEMPT_DYNAMIC Sun Mar 23 03:39:27 UTC x86_64 x86_64 x86_64 GNU/Linux
dnpws15% node --version
v22.14.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked reproduction, package.json, and index.js, then run node index.js with Node v22.14.0 on GNU/Linux to confirm the segmentation fault. Compare the behavior with Alpine Linux and trace the @swc-node/register/esm entry point; done means the reported GNU/Linux invocation no longer crashes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, node.js, typescript
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100