Directory Error

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

Did you find this page helpful?