node index problem

GitHub
guide/code-samples/creating-your-bot/initial-files/index.js at main...
The official guide for discord.js, created and maintained by core members of its community. - discordjs/guide
No description
40 Replies
d.js toolkit
d.js toolkitā€¢8mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - āœ… Marked as resolved by OP
Luca | LeCarbonator
Luca | LeCarbonatorā€¢8mo ago
at which path are you calling node index.js? is the file structure the same as in the link you sent?
Wolfie
WolfieOPā€¢8mo ago
Yes I have index.js under a folder called Z_discord And the terminal was Users/my name/Z_discord
Wolfie
WolfieOPā€¢8mo ago
No description
shikoshib
shikoshibā€¢8mo ago
I think you should've installed the package first ;-;
Wolfie
WolfieOPā€¢8mo ago
did i not?
shikoshib
shikoshibā€¢8mo ago
I don't see the node_modules folder Show the package.json
Wolfie
WolfieOPā€¢8mo ago
oh oops i didnt move it in
Wolfie
WolfieOPā€¢8mo ago
\
No description
shikoshib
shikoshibā€¢8mo ago
try running now? oh wait index.js is empty as well šŸ˜µā€šŸ’«
Wolfie
WolfieOPā€¢8mo ago
No description
Wolfie
WolfieOPā€¢8mo ago
shows this when i open
shikoshib
shikoshibā€¢8mo ago
oh well, try running it
Wolfie
WolfieOPā€¢8mo ago
No description
shikoshib
shikoshibā€¢8mo ago
iirc a ">" character shows that you entered a multiple line input in powershell
Wolfie
WolfieOPā€¢8mo ago
oh no its just the
Wolfie
WolfieOPā€¢8mo ago
No description
shikoshib
shikoshibā€¢8mo ago
hm weird did you paste the token into config json?
Wolfie
WolfieOPā€¢8mo ago
mhm
shikoshib
shikoshibā€¢8mo ago
huh interesting
Wolfie
WolfieOPā€¢8mo ago
{ "token": "..." } replace .. with my token am i supposed to run in terminal? or command thingy command promopt
shikoshib
shikoshibā€¢8mo ago
it doesn't matter, it's pretty much the same
Wolfie
WolfieOPā€¢8mo ago
icic should i restart or something
shikoshib
shikoshibā€¢8mo ago
idk tbh, that's weird that it doesn't run
Wolfie
WolfieOPā€¢8mo ago
No description
Wolfie
WolfieOPā€¢8mo ago
or is this the problem doesnt look right to me the ...
shikoshib
shikoshibā€¢8mo ago
no, i think it's fine
Wolfie
WolfieOPā€¢8mo ago
yeah but why is there a ... tho if index js isnt a folder
shikoshib
shikoshibā€¢8mo ago
vs code refers to it as callbacks, functions, variables, etc simply put, parts of the code
Wolfie
WolfieOPā€¢8mo ago
ohhh icic is it cuz Z_discord isnt my main file and im using cd currently its users/my_name but i use cd Z_discord man nvm i think i found the problem i closed all the codes and reoponed and the config file had nothing
shikoshib
shikoshibā€¢8mo ago
yep is the issue solved?
Wolfie
WolfieOPā€¢8mo ago
nope
Wolfie
WolfieOPā€¢8mo ago
No description
Wolfie
WolfieOPā€¢8mo ago
No description
Wolfie
WolfieOPā€¢8mo ago
theres a error here i think
Wolfie
WolfieOPā€¢8mo ago
No description
Wolfie
WolfieOPā€¢8mo ago
its like highlighted white
Wolfie
WolfieOPā€¢8mo ago
No description
Wolfie
WolfieOPā€¢8mo ago
No description
Wolfie
WolfieOPā€¢8mo ago
require is apparently the error? FINALLY IT WORKED i just launched visual studio code under my file instead of just opening one by one šŸ˜­ @shikoshib ty
Want results from more Discord servers?
Add your server