esm.sh
esm.sh copied to clipboard
Failed to import - [email protected]
Failing module
- GitHub: https://github.com/alangpierce/sucrase
- npm: https://www.npmjs.com/package/sucrase
import { transform } from "https://esm.sh/[email protected]";
// This throws (esm.sh v59-v66)
transform("test();", { transforms: [] });
This used to work. I tried pinning a bunch of older versions and finally got it working with v58
:
import { transform } from "https://esm.sh/[email protected]?pin=v58";
// This works (esm.sh v58)
transform("test();", { transforms: [] });
Error message
After running deno run
I got this:
error: Uncaught TypeError: Ki.default is not a constructor
at Ui (https://cdn.esm.sh/v66/[email protected]/deno/sucrase.js:133:4807)
at vk (https://cdn.esm.sh/v66/[email protected]/deno/sucrase.js:133:4138)
at .../test.ts:3:1
Additional info
- esm.sh version: v66
- Deno version: 1.18.2 (release, x86_64-pc-windows-msvc)
I think it's the same issue as https://github.com/vitejs/vite/issues/7112, probably caused by esbuild
@elisee @nihgwu could you retry with the newer versions of both sucrase & esm.sh?