esm.sh
esm.sh copied to clipboard
Failed to import - react-fontawesome imports `cdn.esm.shreact`
Failing module
- GitHub: https://github.com/FortAwesome/react-fontawesome
- npm: https://www.npmjs.com/package/@fortawesome/react-fontawesome
import { FontAwesomeIcon } from 'https://esm.sh/@fortawesome/[email protected]'
Error message
After running deno run I get this:
/* your error log here */
Download https://cdn.esm.shreact/
error: AssertionError: "data" is unexpectedly null for "https://cdn.esm.shreact/".
The AssertionError is "expected", as tsc isn't emitting something that it is expected
Additional info
- esm.sh version: v59
- Deno version: 1.17.1
I can not repeat it, more details?
works fine on v61:
➜ deno eval "import { FontAwesomeIcon } from 'https://esm.sh/@fortawesome/[email protected]'"
Download https://esm.sh/@fortawesome/[email protected]
Download https://cdn.esm.sh/v61/@fortawesome/[email protected]/deno/react-fontawesome.js
Download https://cdn.esm.sh/v61/@fortawesome/[email protected]/index.d.ts
Download https://cdn.esm.sh/v61/@fortawesome/[email protected]/deno/fontawesome-svg-core.js
Download https://cdn.esm.sh/v61/[email protected]/deno/prop-types.js
Download https://cdn.esm.sh/v61/@fortawesome/[email protected]/index.d.ts
Download https://cdn.esm.shreact/
Download https://cdn.esm.sh/v61/@fortawesome/[email protected]/index.d.ts
Sorry for the late reply. Please try to run it in a ts file, or eval with ts, not repl or standard eval.
Even in both commands you ran, you can see https://cdn.esm.shreact/, which isnt an existing url
ok I see now:
➜ deno eval --ext=ts "import { FontAwesomeIcon } from 'https://esm.sh/@fortawesome/[email protected]'"
Download https://cdn.esm.shreact/
error: AssertionError: "data" is unexpectedly null for "https://cdn.esm.shreact/".
at assert (deno:cli/tsc/99_main_compiler.js:71:13)
at Object.getSourceFile (deno:cli/tsc/99_main_compiler.js:289:7)
at findSourceFileWorker (deno:cli/tsc/00_typescript.js:115354:29)
at findSourceFile (deno:cli/tsc/00_typescript.js:115263:26)
at deno:cli/tsc/00_typescript.js:115215:85
at getSourceFileFromReferenceWorker (deno:cli/tsc/00_typescript.js:115199:77)
at processSourceFile (deno:cli/tsc/00_typescript.js:115215:13)
at deno:cli/tsc/00_typescript.js:115506:17
at Object.forEach (deno:cli/tsc/00_typescript.js:391:30)
at processReferencedFiles (deno:cli/tsc/00_typescript.js:115505:16)
i guess it is types problem, i will look into it.
Found another case of this: https://esm.sh/@tensorflow/tfjs-backend-webgpu somewhere deep within it will try to import https://cdn.esm.shwebgl2/