-
Notifications
You must be signed in to change notification settings - Fork 30
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
Segmentation fault when running in watch mode in Node 20.12.x or greater #173
Comments
I've identified the cause. For some reason dynamically importing Line 53 in 1e73929
If you import So the change I made to get things working looks like this: // top of file
import { subscribe, type AsyncSubscription } from "@parcel/watcher";
// registering subscription (line 55)
watcher = await subscribe(
devServer.cwd,
... rest
) I'm aware this fix isn't ideal because we it no longer dynamically imports from |
Okay I'm not able to reproduce on MacOS so this seems to be Linux specific. |
Hi dear @joshmossas. Can you please try Lazy loading of watcher is essential for listhen because we don't need it in all paths. We might track this issue from https://github.com/parcel-bundler/watcher or Node.js seems lower level bug. |
Okay so it looks like the source of the issue is actually this. parcel-bundler/watcher#170 Listhen is using wildcard ignores by default, which is triggering this bug Line 77 in 1e73929
You can disregard my comment about lazy loading being the issue. In my fork turns out I accidentally imported I've also reverted to using lazy loading in my fork (with |
Thanks for checking upstream 🙏🏼 okay let's track from there then. i will also subscribe to see what happens. |
Environment
Reproduction
https://github.com/joshmossas/listhen-watch-segfault
Describe the bug
Running listhen in watch mode causes you to get the following error:
Segmentation fault (core dumped) ELIFECYCLE Command failed with exit code 139.
This is true if you use the cli (
listhen ./my-file.ts --watch
) or if you calllistenAndWatch()
directly.Additional context
Downgrading to NodeJS
v20.11.1
causes everything to run normally.I haven't tried to reproduce on other operating systems. So I can only confirm that this is happening in Linux.
Logs
No response
The text was updated successfully, but these errors were encountered: