#import

11 messages · Page 1 of 1 (latest)

cinder hamlet
#

i keep experiencing LSP meltdowns where random imports just stop being understood at random points in development and the only way to fix it is restarting extension hosts. sometimes that won't work either and i'll have to do a full IDE restart. zero runtime issues.

initially the issue was happening with discordjs randomly, now it's happening with standard libs too. nothing special in project configuration just deno init and got to work, here's my deno.json: json { "tasks": { "dev": "deno run --allow-read --allow-net --allow-env core/watcher.ts", "createcommand": "deno run --allow-write core/createcommand.ts" }, "imports": { "@std/assert": "jsr:@std/assert@1", "@std/async": "jsr:@std/async@^1.0.5", "@std/dotenv": "jsr:@std/dotenv@^0.225.2", "discord.js": "npm:discord.js@^14.16.3" } }

cinder hamlet
#

can't find anybody having the same issue as me; this has never happened with regular typescript lsp

cinder hamlet
#

finally had the discordjs issue

#

clicked the file button at "declares REST [link] locally"

#

and got this error

#

[Window Title]
Visual Studio Code

[Main Instruction]
Unable to open 'index.d.mts'

[Content]
Unable to resolve resource c:/Users/username/AppData/Local/deno/npm/registry.npmjs.org/discord.js/14.16.3/typings/index.d.mts

[OK] [Cancel]

#

and the file does exist

#

it fixes when i close deno?????????

#

so damn confused here

#

i'm using Deno.watchFs, debounce, for await syntax

const onFsChange = debounce(async (event: Deno.FsEvent) => {
 /* lots of code */
}, 250)
for await (const event of watcher)
    onFsChange(event)
#

deno isn't even open anymore and the bug happens again :^)