spac3crawler
spac3crawler•7d ago

Issues installing npm packages

Im attempting to install discord.js (an npm package) via cli using deno install npm:discord.js It says its added successfully and shows up in deno.json, but says I don't have the module installed when I try to use it in a ts file.
No description
No description
3 Replies
NeTT
NeTT•6d ago
your import map has it mapped as "discord.js" so instead of import x from "npm:discord.js" Use import x from "discord.js" Tho that shouldn't be causing your problem, likely just that vscode needs a reload
spac3crawler
spac3crawlerOP•6d ago
Fixed that. Also reloaded vscode but its still giving me that issue. Code runs fine though, just really need it to stop that error because I can't use intellisense..
Mrcool 🇵🇸
it seems like the error is coming from ts server instead of deno lsp, maybe you didn't deactivate it correctly

Did you find this page helpful?