worker-tools / html

HTML templating and streaming response library for Service Worker-like environments such as Cloudflare Workers.

Home Page:https://workers.tools/html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Skypack package fails in Deno and browser

solson opened this issue · comments

When I run this example with deno run html_example.ts:

import { html } from 'https://cdn.skypack.dev/@worker-tools/html@1.3.3?dts';
const str = "1 < 2";
console.log(html`<p>${str}</p>`);

I get this error message:

error: Uncaught SyntaxError: The requested module '/new/whatwg-stream-to-async-iter@v0.1.0/dist=es2020,mode=imports?from=whatwg-stream-to-async-iter' does not provide an export named 'asyncIterableToStream'
import {asyncIterableToStream} from "/new/whatwg-stream-to-async-iter@v0.1.0/dist=es2020,mode=imports?from=whatwg-stream-to-async-iter";
        ~~~~~~~~~~~~~~~~~~~~~
    at <anonymous> (https://cdn.skypack.dev/-/@worker-tools/html@v1.3.3-sRWNjqLa4FlG7xPClDMG/dist=es2020,mode=imports/optimized/@worker-tools/html/html-response.js:1:9)

It appears that I can reproduce it in my browser here. The console displays these problems:

[Package Error] "whatwg-stream-to-async-iter@v0.1.0" could not be built. (Imported by "@worker-tools/html").
[1/5] Verifying package is valid…
[2/5] Installing dependencies from npm…
[3/5] Building package using esinstall…
Running esinstall...
Cannot find module 'whatwg-stream-to-async-iter' _display:67:34

Uncaught Error: [Package Error] "whatwg-stream-to-async-iter@v0.1.0" could not be built. (Imported by "@worker-tools/html").
    <anonymous> https://cdn.skypack.dev/error/build:whatwg-stream-to-async-iter@v0.1.0-xppzuEyYNCif78KGzmpG?from=@worker-tools/html:17

Try with v1.3.4

It works on v1.3.4, thanks!