Import map: unable to load a local module
See original GitHub issueI have import-map.json
at the root directory of my project with this content:
{
"imports": {
"/": "./",
"./": "./"
}
}
This is the contents of .vim/coc-settings.json
:
{
"deno.enable": true,
"deno.importMap": "./import-map.json",
"tsserver.enable": false
}
And in some given test file, I have this as the first line:
import { assertEquals } from "/deps.ts";
That line causes the following error:
Unable to load a local module: "file:///deps.ts".
Please check the file path. (deno no-local)
I cannot do gf
to that file, for instance, and get no types or documentation whatsoever for assertEquals
.
Running deno test --import-map ./import-map.json src/foo.test.ts
works.
Is this an issue with my config/setup perhaps, or could it be some other problem?
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Client-side import map unable to locate module (error 404)
I'm attempting to import a module in vanilla JS in the browser (no bundler). The module is worker-timers ...
Read more >Using ES modules in browsers with import-maps
In this post, we'll go through a few basic examples of how ES modules are used and then explore the possibility of using...
Read more >How to Dynamically Import JavaScript with Import Maps
In this tutorial, you'll use import maps and JavaScript modules to import code without build tools. You'll create a basic application that ...
Read more >Improve ease of use for import maps · Issue #3585 - GitHub
Not being able to use import maps in my reusable library modules has been annoying for me, too. One idea I came up...
Read more >Everything You Need to Know About JavaScript Import Maps
Import maps are a new way for web pages to control the behavior of JavaScript imports, potentially enabling you to ditch your build...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in v3.10.2
Still working on this, maybe there’s something wrong on workspace configuration usage.