D
Deno

help

Using "imports" in deno.json doesn't work in VS.code

Jjcayzac11/25/2023
* deno 1.38.3 * vs.code 1.84.2 * denoland.vscode-deno 3.28.0 I got rid of my import map and moved the "imports" directly into deno.json, as supported since 1.30.0. Deno works fine, but the VS.code extension is now broken and complains about the missing import map on each of my local import { … } from "@/foo/bar.ts".
Nnayeemrmn11/25/2023
It's probably because your deno.json is in a subdirectory (not the workspace root). Support for that is coming soon but you can work around it by pointing to the file in the "deno.config" setting.
Jjcayzac11/25/2023
it's not, it's at the root of the workspace. I reverted my changed and brought back the import map for the time being.
Sscarf11/25/2023
hi, i can't reproduce, could you share your project sturcture, config and error messages?
No description
No description
Jjcayzac11/25/2023
Project structure is basically the same as you
Jjcayzac11/25/2023
Works
No description
No description
Jjcayzac11/25/2023
Doesn't work
No description
No description
No description
Sscarf11/25/2023
i suspect deno has higher precedence for import_map.json, and since it's empty, it errors. try removing the empty import_map.json
Jjcayzac11/25/2023
well, deno works perfectly fine. the only problem is the vscode extension. ah, removing the empty import map (that's not referenced anywhere anymore) fixes the extension! thanks! ah, i see what happened… in the workspace's settings.json, I had "deno.importMap": "import_map.json" 🤦

Looking for more? Join the community!

Recommended Posts
deno repl start time in containerWhy does deno repl take a couple seconds to start in a container the second time around, and starts How to detect when --watch flag has been passed to `deno run` programatically?I am writing a small cli script, and I have a few bits of code that do not play nicely with `deno ruHelp with npm peerDependenciesHi 👋 I am using an npm library that has `@sinclair/typebox` listed under `peerDependencies`. It giAWS Lambda configHow do i set permissions in deno for aws lambda. Like --allow-env etcMigrating from EventEmitter…Hi! I've got some legacy code that depends on `node:events` 's `EventEmitter` class, specifically itusing flexsearchso flexsearch has a index.d.ts thats broken and hasn't been touched in 2ish years and instead you shDoes Deno third party modules support to wrap NPM in importmapHere is my first module: https://deno.land/x/lume_fluent@1.0.0-alpha My importmap for the module isHelp using DenoMaileri'm trying to use it but i get Deno is not defined when i try to send the email, any tips? how wouldDebug all tests in VSCodeHi everyone. I was hoping to use the equivalent of "deno test" in such a way that I can set a breakMost complete Deno Rust runtime?I’m trying to embed the Deno runtime into my Rust program. I’m looking for the most “complete” Deno Language server crashing in VSC outside of deno projectsHow to write a new project template scriptHey, I've written a small game engine to create text adventures in Deno. The resulting project is a Seamlessly include TailwindcssIs there a recommended way of achieving this at the moment? What is the cleneast way of including tatidy up `deno.lock`Hey, is there something like `go mod tidy` (https://golangbyexample.com/go-mod-tidy/) in Deno? The bSyntaxError on Web3 packageI'm trying to use this module in my project https://deno.land/x/web3@v0.11.1 and i'm using the code how to document oak apiWhat’s the best way to document an oak api. Like swagger or some kind of thatweb based cmsIs there any web based cms system like word press based on deno or fresh?Minimal code for Preact SSRWhat's the actual code to do some Preact SSR with Deno? For example something simple like a counterHow to use recent Tensorflow.JS? TF from deno.land/x/tensorflow@v0.21 appears to work, but it's oldI've only tried the TF package from deno.land/x/tensorflow@v0.21 with the readme page example. I'm hDeno Deploy isolate startup timeis this startup time normal? https://media.discordapp.net/attachments/936130919163641856/11757670644