re: How to set up a Discord music bot VIEW POST

re: Did you place it in the root of the project? (same place as index.js)

If you mean dragging the config.json into the index.js file, it wont allow. If you mean placing the config.json into the sateenkaari folder (the folder where all of the package.json files etc. are, then I did that.

I think you are trying to import it in a wrong way, in your index.js file did you try to require("../../config.json")?

It should be only "config.json" if so

throw err;

Error: Cannot find module 'C:\Users\Truong Anh\Desktop\bot1\index.js'. Please verify that the package.json has
a valid "main" entry
?[90m at tryPackage (internal/modules/cjs/loader.js:297:19)?[39m
?[90m at Function.Module._findPath (internal/modules/cjs/loader.js:528:18)?[39m
?[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:784:27)?[39m
?[90m at Function.Module._load (internal/modules/cjs/loader.js:690:27)?[39m
?[90m at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)?[39m
?[90m at internal/main/run_main_module.js:17:11?[39m {
code: ?[32m'MODULE_NOT_FOUND'?[39m,
path: ?[32m'C:\Users\Truong Anh\Desktop\bot1\package.json'?[39m,
requestPath: ?[32m'C:\Users\Truong Anh\Desktop\bot1'?[39m

this is my trouble error
any suggestions to help me?

Um do you have a package.json file?
If you cloned mine just run npm install

Seems like the problem doesn't occur anymore. Now it has to display an error like this one:

Structures.extend('Guild', Guild => {

TypeError: Cannot read property 'extend' of undefined
at Object. (C:\Users\me\Downloads\sateenkaari\index.js:6:12)
[90m at Module._compile (internal/modules/cjs/loader.js:1128:30)[39m
[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)[39m
[90m at Module.load (internal/modules/cjs/loader.js:983:32)[39m
[90m at Function.Module._load (internal/modules/cjs/loader.js:891:14)[39m
[90m at Function.executeUserEntryPoint as runMain[39m
[90m at internal/main/run_main_module.js:17:47[39m

you probably did not install discord.js master, hit

npm i discordjs/discord.js

code of conduct - report abuse