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

deno_docker example fails with 'TypeError: Deno.writeAll is not a function' #424

Open
und-miller opened this issue Oct 15, 2024 · 3 comments

Comments

@und-miller
Copy link

Copying the code verbatim from the docker example does not work.

Can be reproduced by:

  1. Copy the code from https://github.com/denoland/deno_docker/tree/main/example
  2. Run docker build -t app .
  3. Run docker run -it --init -p 1993:1993 app
  4. From another terminal run curl http://localhost:1993
  5. Fails with the error below
error: Uncaught (in promise) TypeError: Deno.writeAll is not a function
      await Deno.writeAll(
                 ^
    at BufWriter.flush (https://deno.land/[email protected]/io/bufio.ts:468:18)
    at writeResponse (https://deno.land/[email protected]/http/_io.ts:288:16)
    at eventLoopTick (ext:core/01_core.js:175:7)
    at async ServerRequest.respond (https://deno.land/[email protected]/http/server.ts:84:7)
@dionjwa
Copy link

dionjwa commented Oct 25, 2024

Also this fails the same way:

deno run -A --unstable https://deno.land/x/[email protected]/install.ts

@introvert
Copy link

any updates on this? we have the same issue

@kimdcottrell
Copy link

I ran into this. You can get past this by simply using this in the main.ts:

Deno.serve(
    { port: 1993, hostname: "0.0.0.0" }, 
    (_req) => new Response("Hello, world")
);

Seems to be related to a depreciation in 1.40 that was fully removed in 2.0.

https://deno.com/blog/v1.40#deprecations-stabilizations-and-removals
https://docs.deno.com/runtime/reference/migration_guide/

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

4 participants