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

Import maps don't take NPM modules #243

Open
andreespirela opened this issue Jan 10, 2024 · 1 comment
Open

Import maps don't take NPM modules #243

andreespirela opened this issue Jan 10, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@andreespirela
Copy link
Collaborator

Bug report

Currently, NPM modules are not supported in import maps. It makes the runtime fail:

Import map:

{
  "imports": {
    "iseven": "npm:is-even"
  }
}

Code:

import isEven from "iseven"; 
globalThis.isTenEven = isEven(9);

Panic

thread 'deno_runtime::test::test_eszip_with_source_file' panicked at crates/base/src/deno_runtime.rs:491:30:\ncalled `Result::unwrap()` on an `Err` value: Relative import path \"iseven\" not prefixed with / or ./ or ../ f
@andreespirela andreespirela added the bug Something isn't working label Jan 10, 2024
@andreespirela andreespirela self-assigned this Jan 18, 2024
@maleksal
Copy link

maleksal commented May 21, 2024

Any updates? I'm using self-hosted Supabase and I'm facing the same issue

"msg": "InvalidWorkerCreation: worker boot error Relative import path \"express\" not prefixed with / or ./ or ../ from \"file:///home/deno/functions/imap/index.ts\""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants