Directory Error

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

Did you find this page helpful?