esm-dev / esm.sh

A fast, smart, & global CDN for modern(es2015+) web development.
https://esm.sh
MIT License
2.95k stars 143 forks source link

Failed to init CLI on Deno #798

Open matlik opened 4 months ago

matlik commented 4 months ago

Failing module

deno run -A -r https://esm.sh init

Error message

After running deno run I got this:

$ deno run -A -r https://esm.sh init
error: Uncaught (in promise) TypeError: Cannot convert undefined or null to object
    Object.entries(imports).sort(sortByValue),
           ^
    at Function.entries (<anonymous>)
    at sortImports (https://esm.sh/:427:12)
    at saveImportMap (https://esm.sh/:335:25)
    at Object.init (https://esm.sh/:183:11)
    at eventLoopTick (ext:core/01_core.js:153:7)
    at async https://esm.sh/:514:5

Additional info

This was attempted in a brand new project that was created via deno init.

librejutsu commented 4 months ago

I actually got this:

Initialized deno.json, 3 task added:
  - deno task esm:add [packages...]
  - deno task esm:update [packages...]
  - deno task esm:remove [packages...]
✨ Done in 7.80ms

But nothing really changed, tasks were not really added to deno.json. Tried twice on a fresh install of Deno Fresh.