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.


3 Replies
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 reloadFixed 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..
it seems like the error is coming from ts server instead of deno lsp, maybe you didn't deactivate it correctly