jurassiscripts / velociraptor

The npm-style script runner for Deno

Home Page:https://velociraptor.run

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Import map diagnostics: - Invalid top-level key "hash". Only "imports" and "scopes" can be present.

borsemayur2 opened this issue · comments

Getting the message after adding imap: import_map.json in scripts.yaml file. The app runs though.

  dev:
    cmd: deno run src/mod_json.ts
    allow:
      - read
      - write
    watch: true
    unstable: true
    imap: import_map.json

Deno: 1.9.0
Velociraptor: 1.0.0-beta.18

Hi @borsemayur2!

This looks like an import map issue. As the message suggests: is the format of import_map.json correct?
See WICG import-maps

The message is about hash, added by trex. It seems like a package-lock. Closing the issue as it belongs to trex. Thanks

{
  "imports": {
    "denodb": "https://deno.land/x/denodb/mod.ts",
    "oak": "https://deno.land/x/oak/mod.ts",
    "oak_graphql": "https://deno.land/x/oak_graphql/mod.ts"
  },
  "hash": {
    "denodb": "c69c2c8a891f8db67af6c03e2e6e8738e2889949a0d8f415fa5b1b22dac8d02b",
    "oak_graphql": "a4d70645b3798dbe2574868d8640ec42679290e77f308331a0b9de6036779c3f",
    "oak": "26e45e79380e5ba551993537a73526ae81a55c63e981a318c5c5e47aa4fbd8c3"
  }
}