Directory Error

/home/containers/src/commands/test.js Meets a error of no directory
No description
14 Replies
d.js toolkit
d.js toolkit15mo 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!
GiNE
GiNEOP15mo ago
Hello, guys! I met the error ENOTDIR, I do not understand why the test.js file MUST be a directory?
d.js docs
d.js docs15mo ago
- File paths explained in detail: learn more - . refers to the current directory - .. refers to the parent directory - Node path module: learn more
GiNE
GiNEOP15mo ago
..
Toast
Toast15mo ago
you are trying to use readdirSync on a file. use readFileSync with encoding instead.
GiNE
GiNEOP15mo ago
What does readdirSync means??
Toast
Toast15mo ago
readdirSync is for reading the folders/directories readFileSync is for reading the file(s)
GiNE
GiNEOP15mo ago
Do u know where its stored? Bot.js?
Toast
Toast15mo ago
perhaps, it is coming from your handleCommands.js
GiNE
GiNEOP15mo ago
Oh ok Lemme check
Toast
Toast15mo ago
line 35 to be specific
GiNE
GiNEOP15mo ago
Thxxx Lemme ss for u What to change
GiNE
GiNEOP15mo ago
No description
GiNE
GiNEOP15mo ago
Do i change the path}/$folder to file?
Want results from more Discord servers?
Add your server