RichCorbsR
Denoβ€’15mo agoβ€’
5 replies
RichCorbs

Deno 2.0: Deno.write is not a function

I'm trying to use a 3rd party package with Deno 2 and get this error:

error: Uncaught (in promise) TypeError: Deno.write is not a function
    await Deno.write(this.writer.rid, headers);
               ^
    at Writer.setup (https://deno.land/x/compress@v0.4.6/gzip/writer_gzip.ts:41:16)
    at eventLoopTick (ext:core/01_core.js:175:7)
    at async GzipStream.compress (https://deno.land/x/compress@v0.4.6/gzip/gzip_stream.ts:21:5)


I've opened an issue and the maintainer is unable to help at this time. I have tried to fix it but have been unable.

Is there anything obvious that changed in Deno 2.0 that would indicate a obvious fix to someone who knows what they're doing? Like replace Deno.write with ??? or similar?
Was this page helpful?