Module 'discord.js' not found

Hello I am a user of a tool called discord bot Maker and after a wrong manipulation I pressed reset / reset default node modules instead of clicking on reset default node modules and since I find myself with this please help me (if the translation is bad I’m sorry I’m in auto-correct because I do not speak English)

(Here is the error that is marked)

node:internal/modules/cjs/loader:936
? throw err;
? ^
?
? Error: Cannot find module ‘discord.js’
? Require stack:
? - F:\tout les dossier\les truc important\les bots discord\AntiRaid\bot.js
? at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
? at Function.Module._load (node:internal/modules/cjs/loader:778:27)
? at Module.require (node:internal/modules/cjs/loader:999:19)
? at require (node:internal/modules/cjs/helpers:102:18)
? at Object. (F:\tout les dossier\les truc important\les bots discord\AntiRaid\bot.js:10:36)
? at Module._compile (node:internal/modules/cjs/loader:1097:14)
? at Object.Module._extensions…js (node:internal/modules/cjs/loader:1149:10)
? at Module.load (node:internal/modules/cjs/loader:975:32)
? at Function.Module._load (node:internal/modules/cjs/loader:822:12)
? at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
? code: ‘MODULE_NOT_FOUND’,
? requireStack: [
? ‘F:\tout les dossier\les truc important\les bots discord\AntiRaid\bot.js’
? ]
? }
?
? Node.js v17.4.0
?

Welcome to the community, @kawaii_iKi_san! Just open the terminal and type:

npm i discord.js

This will ask npm to install the package discord.js. A little bit more readable version:

npm install discord.js

Happy Glitching!
Tiago

1 Like

sorry but it still doesn’t work

Do you get any error? Can you please give us your project URL?
Also, can you please share your package.json?
Thanks!

for the url I don’t know how to do but for package.json here

{
“name”: “discord-bot-maker-bot”,
“author”: “Robert Borghese”,
“main”: “bot.js”,
“version”: “1.6.10”,
“dependencies”: {
“discord.js”: “^13.8.0”,
“fstorm”: “latest”,
“jimp”: “latest”,
@discordjs/voice”: “latest”,
@discordjs/opus”: “latest”,
“ffmpeg-static”: “latest”,
“tweetnacl”: “latest”,
“youtube-dl-exec”: “^2.0.2”,
“ytdl-core”: “^4.10.0”
},
“is-music-bot”: true
}

Everything seems right here to me. Can you please share your editor’s URL?
(the full URL of the editor)

my editor is Discord Bot Maker
(url on steam : Discord Bot Maker on Steam)

Ahhhh, so you’re not using Glitch to code? That makes it a little more difficult. Can you share your code?

the problem is that discord botmaker is a simple way to create discord bots without knowing how to code so myself I do not know where is my code moreover since it is a simple way and that one is not supposed to modify the code with naked hand therefore it arranges the code in any way

Your code is in F:\tout les dossier\les truc important\les bots discord\AntiRaid\ according to the error message. It should be a bunch of .js files and some .json files.

1 Like

How does it work?

what, the code? dunno

1 Like

sorry i want say How its

didn’t understand the above

separate question:

installing discord.js isn’t supposed to make it “work,” it’s supposed resolve a very specific issue that the error message describes. so what’s next?

1 Like

the error has not changed

Were there any messages from npm when you tried to install discord.js?

1 Like

i dont know

Have you used a command line before?

edit: not as a condescending thing, I swear. asking because I don’t know if using the command line is even a normal part of using the aforementioned program

1 Like