-
-
Notifications
You must be signed in to change notification settings - Fork 204
Closed
Description
Thank you for esm.sh, of all the things I tried this gets me the closest to running telegraf on Deno. But not close enough:
~
$ deno --version
deno 1.7.1 (release, x86_64-pc-windows-msvc)
v8 8.9.255.3
typescript 4.1.3
~
$ deno eval 'import "https://esm.sh/telegraf@4.0.2?dev"'
error: Uncaught SyntaxError: The requested module '/v15/stream-browserify@3.0.0/esnext/stream-browserify.development.js' does not provide an export named 'Readable'
import {Readable} from "/v15/stream-browserify@3.0.0/esnext/stream-browserify.development.js";
~~~~~~~~
at <anonymous> (https://cdn.esm.sh/v15/telegraf@4.0.2/esnext/telegraf.development.js:1542:9)
[1] ~
$
telegraf depends on sandwich-stream, which has an .mjs entry which import { Readable } from 'stream'. This is legal:
~
$ node --version
v14.0.0
~
$ node --input-type=module --eval 'import { Readable } from "stream"'
~
$
However, stream-browserify, used by esm.sh to ponyfill stream, doesn't support it. I can open a PR, but only if @goto-bus-stop or another maintainer promises to actually review it.
Otherwise, esm.sh should switch to better maintained ponyfill, perhaps https://deno.land/std/node/stream.ts?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels