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

npm run serves fails with Segmentation fault (core dumped #120

Open
chrissound opened this issue Apr 22, 2023 · 1 comment
Open

npm run serves fails with Segmentation fault (core dumped #120

chrissound opened this issue Apr 22, 2023 · 1 comment

Comments

@chrissound
Copy link

codewarrior@blueberry:/home/chris/temp/wiptemp/774/purescript-halogen-template$ npm run serve

> serve
> parcel dev/index.html --open

Port "1234" could not be used
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: spawn xdg-open ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn xdg-open',
  path: 'xdg-open',
  spawnargs: [ 'http://localhost:38331' ]
}
Segmentation fault (core dumped)

I tried changing parcel to serve on port 1235 instead but run into the same issue:

codewarrior@blueberry:/home/chris/temp/wiptemp/774/purescript-halogen-template$ npm run serve

> serve
> parcel -p 1235 dev/index.html --open

node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: spawn xdg-open ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn xdg-open',
  path: 'xdg-open',
  spawnargs: [ 'http://localhost:1235' ]
}
Segmentation fault (core dumped)

Googling this issue and figuring out it's to do with xdg-open, I removed the --open from package.json which then fixes the issue.

@thomashoneyman
Copy link
Owner

Huh! That's odd. I'm fine with removing --open if you'd like to open a PR.

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

No branches or pull requests

2 participants