esm.sh
esm.sh copied to clipboard
Failed to import -
Failing module
- npm: https://npmjs.com/package/jsdom
$ deno cache https://esm.sh/[email protected]
Error message
After running deno cache I got this:
error: Module not found "https://esm.sh/build/Release/canvas.node?target=denonext".
at https://esm.sh/[email protected]?target=denonext:2:8
Additional info
- Deno version: v1.41.3
Hello. We have a similar problem since version 136. We are using deno 2.1.4 and 2.1.5
We are importing https://esm.sh/@actions/[email protected], which imports the undici package. This leads to import of "/node:sqlite?target=denonext";, but no such module exists.
https://esm.sh/[email protected]?target=denonext
/* esm.sh - [email protected] */
import "/node:sqlite?target=denonext";
export * from "/[email protected]/denonext/undici.mjs";
export { default } from "/[email protected]/denonext/undici.mjs";
I'm not sure whether the node: prefix is expected. The server correctly resolves htttps://esm.sh/sqlite?target=denonext (without the prefix).
Using https://esm.sh/v135/@actions/[email protected] resolves all dependencies correctly.
We ended up downgrading to v135 to solve this issue. It looks like the issue is that removal of build support in v136
Seeing a similar thing with linkedom, thanks for downgrade tip
This works: deno cache https://esm.sh/v135/[email protected]
This doesn't: deno cache https://esm.sh/v136/[email protected]
Hopefully whatever magic "build" was doing before can be resurrected in a new form?
It seems to be a similar problem.
// main.ts
import { Canvas } from 'https://esm.sh/[email protected]';
console.log(Canvas);
% deno --version
deno 2.2.12 (stable, release, aarch64-apple-darwin)
v8 13.5.212.10-rusty
typescript 5.7.3
% deno run main.ts
error: Module not found "https://esm.sh/[email protected]/Release/canvas.node?target=denonext".
at https://esm.sh/[email protected]:2:8