The homepage Deno example fails to run
mybuddymichael opened this issue · comments
Michael Hanson commented
Attempting to run this simple example from the homepage fails:
import ShortUniqueId from 'https://cdn.jsdelivr.net/npm/short-unique-id@latest/src/index.ts';
const uid = new ShortUniqueId();
console.log(uid)
Deno complains:
error: An unsupported media type was attempted to be imported as a module.
Specifier: https://cdn.jsdelivr.net/npm/short-unique-id@latest/package.json
MediaType: Json
It appears that Deno does not yet support JSON modules.
Michael Hanson commented
I just instead used import ShortUniqueId from 'https://esm.sh/short-unique-id';
(per Deno's docs on imports) and that worked fine.
Jean Lescure commented
I've gone ahead and updated the docs on this and this other commit.
Also published a release in order to update npm and the website docs.
Cheers for the contribution @mybuddymichael