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

Error running pages dev #204

Closed
uppercaseVar opened this issue Jan 7, 2022 · 4 comments · Fixed by #211
Closed

Error running pages dev #204

uppercaseVar opened this issue Jan 7, 2022 · 4 comments · Fixed by #211
Labels
pages Relating to Pages

Comments

@uppercaseVar
Copy link

Hello,
I am trying to run pages locally and have successfully installed wrangler 2 but when I run npx wrangler pages dev ./public it fails with the following error.

Compiled Worker successfully.
Serving at http://127.0.0.1:8788/
/user/node_modules/wrangler/wrangler-dist/cli.js:27072
            throw ex;
            ^

Error: spawn xdg-open ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
    at onErrorNT (node:internal/child_process:475: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:288:12)
    at onErrorNT (node:internal/child_process:475:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn xdg-open',
  path: 'xdg-open',
  spawnargs: [ 'http://127.0.0.1:8788/' ]
}

Node.js v17.2.0

Any help is appreciated.

@threepointone
Copy link
Contributor

Looks like it's struggling to open a browser window. Try BROWSER=none npx wrangler pages dev ./public ?

@uppercaseVar
Copy link
Author

That fixed it. Thanks so much!

@motiejunas
Copy link

@threepointone is there a workaround for wrangler dev command?

@threepointone
Copy link
Contributor

Missed your comment, sorry! This PR - #415 should make it log a warning without breaking workflow.

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

Successfully merging a pull request may close this issue.

3 participants