esm-dev / esm.sh

The no-build CDN for modern web development.
https://esm.sh
MIT License
3.19k stars 151 forks source link

Failed to import - discord.js #294

Open DerTev opened 2 years ago

DerTev commented 2 years ago

Failing module

import { Client, Intents } from "https://esm.sh/discord.js"

Error message

After running deno run I got this:

error: Import 'https://cdn.esm.sh/v74/discord-api-types@0.26.1/deno/rpc/v9.js' failed: 500 Internal Server Error
    at https://cdn.esm.sh/v74/discord-api-types@0.26.1/deno/v9.js:2:425

Additional info

talentlessguy commented 2 weeks ago

New error:

import { Client, Intents } from "https://esm.sh/discord.js"
Warning The following packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed:
┠─ npm:zlib-sync@0.1.9
┃
┠─ This may cause the packages to not work correctly.
┠─ Lifecycle scripts are only supported when using a `node_modules` directory.
┠─ Enable it in your deno config file:
┖─ "nodeModulesDir": "auto"
Uncaught TypeError: The URL must be of scheme file
    at fileURLToPath (node:url:1160:11)
    at getFilename (https://esm.sh/v135/@discordjs/ws@1.1.1/denonext/ws.mjs:2:3035)
    at getDirname (https://esm.sh/v135/@discordjs/ws@1.1.1/denonext/ws.mjs:2:3087)