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