Cant find module config.json
Why its said Error: Cannot find module './config.json' while i executing deploy-commands.js?
13 Replies
- 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 OPnode:internal/modules/cjs/loader:1408
throw err;
^
Error: Cannot find module './config.json'
Require stack:
- C:\Users\Administrator\Documents\BloxAssist\src\clientlogin\commands\utility\logging.js
- C:\Users\Administrator\Documents\BloxAssist\src\clientlogin\deploy-commands.js at Function._resolveFilename (node:internal/modules/cjs/loader:1405:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1061:19) at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1066:22)
at Function._load (node:internal/modules/cjs/loader:1215:37) at TracingChannel.traceSync (node:diagnostics_channel:322:14) at wrapModuleLoad (node:internal/modules/cjs/loader:235:24) at Module.require (node:internal/modules/cjs/loader:1491:12) at require (node:internal/modules/helpers:135:16) at Object.<anonymous> (C:\Users\Administrator\Documents\BloxAssist\src\clientlogin\commands\utility\logging.js:9:16) at Module._compile (node:internal/modules/cjs/loader:1734:14) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\Users\Administrator\Documents\BloxAssist\src\clientlogin\commands\utility\logging.js', 'C:\Users\Administrator\Documents\BloxAssist\src\clientlogin\deploy-commands.js' ] }
at defaultResolveImpl (node:internal/modules/cjs/loader:1061:19) at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1066:22)
at Function._load (node:internal/modules/cjs/loader:1215:37) at TracingChannel.traceSync (node:diagnostics_channel:322:14) at wrapModuleLoad (node:internal/modules/cjs/loader:235:24) at Module.require (node:internal/modules/cjs/loader:1491:12) at require (node:internal/modules/helpers:135:16) at Object.<anonymous> (C:\Users\Administrator\Documents\BloxAssist\src\clientlogin\commands\utility\logging.js:9:16) at Module._compile (node:internal/modules/cjs/loader:1734:14) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\Users\Administrator\Documents\BloxAssist\src\clientlogin\commands\utility\logging.js', 'C:\Users\Administrator\Documents\BloxAssist\src\clientlogin\deploy-commands.js' ] }
logging.js
dont know tho i had config.json already

it is in same folder

but my config json its in same folder
yees
how to fix it?
- File paths explained in detail: learn more
-
.
refers to the current directory
- ..
refers to the parent directory
- Node path module: learn moreaaah in my logging.js script?
now it is showing like this

client id and token dont match
If my client and token doesnt match this one will not showing online

now its fixed its from logging.js script