Directory Error

/home/containers/src/commands/test.js Meets a error of no directory
No description
14 Replies
d.js toolkit
d.js toolkit10mo 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
GiNE10mo 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 docs10mo ago
- File paths explained in detail: learn more - . refers to the current directory - .. refers to the parent directory - Node path module: learn more
GiNE
GiNE10mo ago
..
Toast
Toast10mo ago
you are trying to use readdirSync on a file. use readFileSync with encoding instead.
GiNE
GiNE10mo ago
What does readdirSync means??
Toast
Toast10mo ago
readdirSync is for reading the folders/directories readFileSync is for reading the file(s)
GiNE
GiNE10mo ago
Do u know where its stored? Bot.js?
Toast
Toast10mo ago
perhaps, it is coming from your handleCommands.js
GiNE
GiNE10mo ago
Oh ok Lemme check
Toast
Toast10mo ago
line 35 to be specific
GiNE
GiNE10mo ago
Thxxx Lemme ss for u What to change
GiNE
GiNE10mo ago
No description
GiNE
GiNE10mo ago
Do i change the path}/$folder to file?