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•13mo 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•13mo ago
at which path are you calling node index.js? is the file structure the same as in the link you sent?
Wolfie
WolfieOP•13mo ago
Yes I have index.js under a folder called Z_discord And the terminal was Users/my name/Z_discord
Wolfie
WolfieOP•13mo ago
No description
shikoshib
shikoshib•13mo ago
I think you should've installed the package first ;-;
Wolfie
WolfieOP•13mo ago
did i not?
shikoshib
shikoshib•13mo ago
I don't see the node_modules folder Show the package.json
Wolfie
WolfieOP•13mo ago
oh oops i didnt move it in
Wolfie
WolfieOP•13mo ago
\
No description
shikoshib
shikoshib•13mo ago
try running now? oh wait index.js is empty as well šŸ˜µā€šŸ’«
Wolfie
WolfieOP•13mo ago
No description
Wolfie
WolfieOP•13mo ago
shows this when i open
shikoshib
shikoshib•13mo ago
oh well, try running it
Wolfie
WolfieOP•13mo ago
No description
shikoshib
shikoshib•13mo ago
iirc a ">" character shows that you entered a multiple line input in powershell
Wolfie
WolfieOP•13mo ago
oh no its just the
Wolfie
WolfieOP•13mo ago
No description
shikoshib
shikoshib•13mo ago
hm weird did you paste the token into config json?
Wolfie
WolfieOP•13mo ago
mhm
shikoshib
shikoshib•13mo ago
huh interesting
Wolfie
WolfieOP•13mo ago
{ "token": "..." } replace .. with my token am i supposed to run in terminal? or command thingy command promopt
shikoshib
shikoshib•13mo ago
it doesn't matter, it's pretty much the same
Wolfie
WolfieOP•13mo ago
icic should i restart or something
shikoshib
shikoshib•13mo ago
idk tbh, that's weird that it doesn't run
Wolfie
WolfieOP•13mo ago
No description
Wolfie
WolfieOP•13mo ago
or is this the problem doesnt look right to me the ...
shikoshib
shikoshib•13mo ago
no, i think it's fine
Wolfie
WolfieOP•13mo ago
yeah but why is there a ... tho if index js isnt a folder
shikoshib
shikoshib•13mo ago
vs code refers to it as callbacks, functions, variables, etc simply put, parts of the code
Wolfie
WolfieOP•13mo 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•13mo ago
yep is the issue solved?
Wolfie
WolfieOP•13mo ago
nope
Wolfie
WolfieOP•13mo ago
No description
Wolfie
WolfieOP•13mo ago
No description
Wolfie
WolfieOP•13mo ago
theres a error here i think
Wolfie
WolfieOP•13mo ago
No description
Wolfie
WolfieOP•13mo ago
its like highlighted white
Wolfie
WolfieOP•13mo ago
No description
Wolfie
WolfieOP•13mo ago
No description
Wolfie
WolfieOP•13mo 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

Did you find this page helpful?