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

After setup using Deno template: "WebSocket connection to 'ws://localhost:8002/socket' failed:" #7663

Open
1 task done
gr2m opened this issue Oct 14, 2023 · 5 comments
Open
1 task done
Labels
bug:unverified feat:deno Issues related to Deno support

Comments

@gr2m
Copy link

gr2m commented Oct 14, 2023

What version of Remix are you using?

2.0.1

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

npx create-remix@latest --template remix-run/remix/templates/deno
# apply defaults, cd into new directory
npm run dev

Tested in latest Chrome (118.0.5993.70) on Mac OS 13.6

I went trough past issues that reported similar problems

I tried replacing <LiveReload /> with <LiveReload port={8002} /> and adding <meta httpEquiv="Content-Security-Policy" content="connect-src ws://localhost:8002;" />, but it made no difference.

Expected Behavior

no warning.

I also see these logs in the terminal

Watcher File change detected! Restarting!
Import map diagnostics:
  - Invalid top-level key "comment". Only "imports" and "scopes" can be present.
  - Invalid address "" for the specifier key "// `@remix-run/deno` code is already a Deno module, so just get types for it directly from `node_modules/`".

Actual Behavior

screenshot

@brophdawg11 brophdawg11 added the feat:deno Issues related to Deno support label Oct 16, 2023
@wearypossum4770
Copy link

wearypossum4770 commented Oct 19, 2023

Edit: I did some stuff, now it works. I think the version of Remix I was using caused issues.

I also get this when I use the instructions for react at this tutorial
Indie Stack

This is the error I am experiencing.
Screenshot from 2023-10-19 14-19-24

This is my uname information
image

@codyarose
Copy link

codyarose commented Oct 29, 2023

I ran into the same issue right after finishing up the migration to v2.

  • not using deno
  • still on cjs
  • deploying to vercel
    (if any of that matters)

Adding this to my remix.config.js seems to have fixed the console errors:

dev: {
	port: 8080,
},

I haven't specified a custom port anywhere else

@web-dahuyou
Copy link

I have encountered this situation before, and then I tried many ways, and finally solved it in an unconventional method. If you have tried various conventional methods but have not yet resolved them, you can try the following methods:
1、Attempt to clear browser cache data, maybe it' OK
2、Attempt to restart your browser, and try again
3、Try changing to other browser

@vanpelt
Copy link

vanpelt commented Jan 7, 2024

In my case the dev server was listening on port 3001. Adding the following to remix.config.js fixed live reloading:

  dev: {
    port: 8002,
  }

@oslavdev
Copy link

Happened to me when I migrated to vite plugin. Removing <LiveReload/> component helped fixing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:unverified feat:deno Issues related to Deno support
Projects
None yet
Development

No branches or pull requests

7 participants