Open Ettapp opened 1 week ago
Version: Deno 1.43.1
Example given by the doc: https://docs.deno.com/runtime/manual/basics/import_maps#example---using-project-root-for-absolute-imports
{ "imports": { "/": "./", "./": "./" } }
This seems to affect the way paths are resolved when using a command like deno run npm:<package>.
deno run npm:<package>
For example, with the above configuration in deno.json, the command deno run npm:openapi-typescript ... will fail with the error:
deno.json
deno run npm:openapi-typescript ...
error: Module not found "file:///home/user/project-dir/home/user/.cache/deno/npm/registry.npmjs.org/openapi-typescript/6.7.5/bin/cli.js".
As you can see, /home/user/.cache/... has not been used like an absolute path but has been added to the project dir.
/home/user/.cache/...
Not sure if this is an issue with the example given by the doc or the path resolving using import map.
Explicitly removing the use of config file solve the issue: deno run --no-config npm:<package>
deno run --no-config npm:<package>
Version: Deno 1.43.1
Example given by the doc: https://docs.deno.com/runtime/manual/basics/import_maps#example---using-project-root-for-absolute-imports
This seems to affect the way paths are resolved when using a command like
deno run npm:<package>
.For example, with the above configuration in
deno.json
, the commanddeno run npm:openapi-typescript ...
will fail with the error:As you can see,
/home/user/.cache/...
has not been used like an absolute path but has been added to the project dir.Not sure if this is an issue with the example given by the doc or the path resolving using import map.
Explicitly removing the use of config file solve the issue:
deno run --no-config npm:<package>