DenoDDeno
Powered by
underscoreU
Denoβ€’16mo ago
underscore

Discord JS Invalid imports with Deno

Hi, I'm trying to create a discord bot using DiscordJS and Deno. When I import these modules I get errors in the IDE linter but when I run the code, it perfectly works.

Following are the error messages shown by the IDE linter:
Module '"discord.js"' declares 'REST' locally, but it is exported as 'Collection'. deno-ts(2460)

Module '"discord.js"' has no exported member 'Routes' deno-ts(2305)

Module '"discord.js"' declares 'GatewayIntentBits' locally, but it is exported as 'Collection'. deno-ts(2460)

Module '"discord.js"' has no exported member 'SlashCommandBuilder'.deno-ts(2305)
Module '"discord.js"' declares 'REST' locally, but it is exported as 'Collection'. deno-ts(2460)

Module '"discord.js"' has no exported member 'Routes' deno-ts(2305)

Module '"discord.js"' declares 'GatewayIntentBits' locally, but it is exported as 'Collection'. deno-ts(2460)

Module '"discord.js"' has no exported member 'SlashCommandBuilder'.deno-ts(2305)
image.png
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

discord.js with new npm imports
moochMmooch / help
4y ago
Trouble with Deno imports
πΠπ / help
3y ago
Deno Imports
stephenSstephen / help
3y ago
Error while using discord.js with deno
KameqKKameq / help
2y ago