Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to import - elysia (with esm CLI) #952

Open
scarf005 opened this issue Dec 16, 2024 · 0 comments
Open

Failed to import - elysia (with esm CLI) #952

scarf005 opened this issue Dec 16, 2024 · 0 comments
Labels
deno Not working in Deno

Comments

@scarf005
Copy link

Failing module

import { Elysia, t } from 'elysia'

deno.json:

{
  "tasks": {
    "dev": "deno serve --watch -E main.ts",
    "esm:add": "deno run -A https://esm.sh/v135 add",
    "esm:update": "deno run -A https://esm.sh/v135 update",
    "esm:remove": "deno run -A https://esm.sh/v135 remove"
  },
  "imports": {
    "@elysiajs/swagger": "https://esm.sh/v135/*@elysiajs/[email protected]",
    "@elysiajs/swagger/": "https://esm.sh/v135/*@elysiajs/[email protected]/",
    "elysia": "https://esm.sh/v135/*[email protected]",
    "elysia/": "https://esm.sh/v135/*[email protected]/"
  },
  "scopes": {
    "https://esm.sh/v135/": {
      "@scalar/types": "https://esm.sh/v135/@scalar/[email protected]",
      "@sinclair/typebox": "https://esm.sh/v135/@sinclair/[email protected]",
      "cookie": "https://esm.sh/v135/[email protected]",
      "fast-decode-uri-component": "https://esm.sh/v135/[email protected]",
      "openapi-types": "https://esm.sh/v135/[email protected]",
      "pathe": "https://esm.sh/v135/[email protected]"
    }
  }
}
Reproduction step
$ deno run -A -r https://esm.sh init
$ deno task esm:add elysia @elysiajs/swagger

Error message

After running deno run I got this:

error: Relative import path "@sinclair/typebox/system" not prefixed with / or ./ or ../ and not in import map from "https://esm.sh/v135/[email protected]/X-ZS8q/denonext/elysia.mjs"
    at https://esm.sh/v135/[email protected]/X-ZS8q/denonext/elysia.mjs:4:308

Additional info

  • Deno version: 2.1.4
@scarf005 scarf005 added the deno Not working in Deno label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deno Not working in Deno
Projects
None yet
Development

No branches or pull requests

1 participant