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.meta.resolve does not resolve npm: specifiers that have not been loaded already but are in a package that is already loaded #24174

Open
lucacasonato opened this issue Jun 11, 2024 · 1 comment
Labels
bug Something isn't working correctly cli related to cli/ dir deno_core Changes in "deno_core" crate are needed

Comments

@lucacasonato
Copy link
Member

import CanvasKitInit, { CanvasKit } from "npm:canvaskit-wasm/bin/canvaskit.js";

console.log(import.meta.resolve(`npm:canvaskit-wasm/bin/canvaskit.js`));
console.log(import.meta.resolve(`npm:canvaskit-wasm/bin/canvaskit.wasm`));

This outputs:

file:///Users/lucacasonato/Library/Caches/deno/npm/registry.npmjs.org/canvaskit-wasm/0.39.1/bin/canvaskit.js
npm:canvaskit-wasm/bin/canvaskit.wasm
@lucacasonato lucacasonato added the bug Something isn't working correctly label Jun 11, 2024
@lucacasonato lucacasonato added deno_core Changes in "deno_core" crate are needed cli related to cli/ dir labels Jun 11, 2024
@lucacasonato lucacasonato changed the title import.meta.resolve does not resolve npm: specifiers that have not been loaded already import.meta.resolve does not resolve npm: specifiers that have not been loaded already but are in a package that is already loaded Jun 11, 2024
@dsherret
Copy link
Member

I believe the same thing also occurs for jsr: specifiers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly cli related to cli/ dir deno_core Changes in "deno_core" crate are needed
Projects
None yet
Development

No branches or pull requests

2 participants