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: Cannot reach Remix dev server at localhost:3001/ping #9056

Closed
Polygons1 opened this issue Mar 14, 2024 · 5 comments
Closed

Error: Cannot reach Remix dev server at localhost:3001/ping #9056

Polygons1 opened this issue Mar 14, 2024 · 5 comments

Comments

@Polygons1
Copy link

Reproduction

bun run dev on a new remix project

System Info

System:
    OS: macOS 14.1.2
    CPU: (8) arm64 Apple M1
    Memory: 1.00 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Yarn: 1.22.21 - ~/.bun/bin/yarn
    npm: 1.0.21 - ~/.bun/bin/npm
    pnpm: 8.10.2 - ~/node_modules/.bin/pnpm
    bun: 1.0.30 - ~/.bun/bin/bun
  Browsers:
    Safari: 17.1.2
  npmPackages:
    @remix-run/css-bundle: ^2.8.1 => 2.8.1 
    @remix-run/dev: ^2.8.1 => 2.8.1 
    @remix-run/node: ^2.8.1 => 2.8.1 
    @remix-run/react: ^2.8.1 => 2.8.1 
    @remix-run/serve: ^2.8.1 => 2.8.1

Used Package Manager

npm

Expected Behavior

server to run

Actual Behavior

Could not reach Remix dev server at http://localhost:3001/ping
111 | // @ts-expect-error - err may not be SystemError
112 | reject(new FetchError(request to ${request.url} failed, reason: ${err.message}, 'system', err));
113 | finalize();
114 | });
115 |
116 | fixResponseChunkedTransferBadEnding(request_, err => {
^
error: request to http://localhost:3001/ping failed, reason: Can only call URLSearchParams.toJSON on instances of URLSearchParams
code: "undefined"

@brophdawg11
Copy link
Contributor

Can you provide a reproduction or a git repo? I just created a new app via create-remix and it runs OK for me locally on node 20 and bun 1.0.33.

@brophdawg11 brophdawg11 added needs-response We need a response from the original author about this issue/PR runtime:bun labels Mar 18, 2024
@Polygons1
Copy link
Author

I don't have node on my machine

@github-actions github-actions bot removed the needs-response We need a response from the original author about this issue/PR label Mar 18, 2024
@brophdawg11
Copy link
Contributor

Can you provide a reproduction or dig further into where the error is coming from? It is coming from bun? Or a nested dependency? Remix never calls a .toJSON method as far as I can tell in the codebase.

@brophdawg11 brophdawg11 added the needs-response We need a response from the original author about this issue/PR label Mar 25, 2024
@Polygons1
Copy link
Author

I am also getting this:

  at object.<anonymous> (./node_modules/@remix-run/web-fetch/src/fetch.js:116:3)
  at _final (native:1:1)
  at callFinal (native:1:1)
  at prefinish (native:1:1)
  at finishMaybe (native:1:1)
  at native:1:1
  at onend (native:1:1)
  at endReadableNT (native:1:1)
  at processTicksAndRejections (native:1:1)

@github-actions github-actions bot removed the needs-response We need a response from the original author about this issue/PR label Mar 25, 2024
@brophdawg11
Copy link
Contributor

Those Remix web-fetch polyfills are only intended for node usage - bun should have built in fetch APIs so you shouldn't need to install the polyfills which remix-serve does by default. I would use a custom express (or other) server and avoid calling installGlobals so you use bun's built in fetch APIs instead of the Remix polyfills.

Something like this is probably closest to what you want if you want to use Bun's raw HTTP server: https://github.com/mcansh/remix-node-http-server

@brophdawg11 brophdawg11 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants