i need help fixing this error for node.js
does someone mind helping me out? i keep getting this error and get get it resolved
Debugger attached.
Waiting for the debugger to disconnect...
node:internal/modules/cjs/loader:1147
throw err;
^
Error: Cannot find module 'dotenv'
Require stack:
C:\Users\sedef\Desktop\Random Downloads\VS Code\bot_test\index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
at Module._load (node:internal/modules/cjs/loader:985:27)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object.<anonymous> (C:\Users\sedef\Desktop\Random Downloads\VS Code\bot_test\index.js:2:16)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) {
code: 'MODULE_NOT_FOUND',
requireStack: ['C:\Users\sedef\Desktop\Random Downloads\VS Code\bot_test\index.js']
}
Node.js v20.11.1
i can make a github repo if someone helps so they can check my code
10 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 OPyou didn't install
dotenv
packagejust got a bunch of errors trying that
@darp
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
i couldnt find anything else online so i tried fishing somewhere where it would be related
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
at least i know for next time. could you at least tell me your fix for now please
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
alright. thank you for your time