Describe the bug
Getting this error:
SyntaxError: The requested module 'async-wait-until' does not provide an export named 'waitUntil'
Import looks like this
import { waitUntil } from "async-wait-until";
Invocation looks like this
await waitUntil(() => current >= total + 1, { timeout: 10000 });
To Reproduce
Add the above to a bare bones instance of hono directly in the index.ts file
Expected behavior
I expect the module to be found.
Additional context
Is it a package resolution / mapping issue? Claude says:
Aha! That's the issue! The async-wait-until package doesn't provide a named export for [waitUntil] when imported as an ES module (which tsx uses). We need to use the default export:
const waitUntil = (mod as any).default || (mod as any).waitUntil;