#my script cannot require('.config.json')

10 messages · Page 1 of 1 (latest)

icy thicket
#

help

somber ermine
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

simple flare
#

That is not DJS-related

icy thicket
#

its related

#

trust me

#

heres the problem

#

node:internal/modules/cjs/loader:959
throw err;
^

Error: Cannot find module './config.json'
Require stack:

  • C:\Users\alvaro\OneDrive\Desktop\Deas\index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Function.Module._load (node:internal/modules/cjs/loader:804:27)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Users\alvaro\OneDrive\Desktop\Deas\index.js:10:19)
    at Module._compile (node:internal/modules/cjs/loader:1126:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
    at Module.load (node:internal/modules/cjs/loader:1004:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
    code: 'MODULE_NOT_FOUND',
simple flare
#

That is not a discord-js related error

icy thicket
#

then what is that?

#

node js?