Error: Cannot find module '../configs/config.json'

This is happening in my index.js - but that line is in my index?
const { bot } = require('../configs/config.json');
const { bot } = require('../configs/config.json');
No description
3 Replies
d.js toolkit
d.js toolkit5mo 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! - Marked as resolved by staff
chay
chayOP5mo ago
Uploaded my file structure too
Error: Cannot find module '../configs/config.json'
Require stack:
- D:\CodingStuff\JavaScript\Bots\StaffRoles\index.js
Error: Cannot find module '../configs/config.json'
Require stack:
- D:\CodingStuff\JavaScript\Bots\StaffRoles\index.js
Amgelo
Amgelo5mo ago
that's not djs related and your path seems to be wrong as well ../ means one folder up it's searching on D/CodingStuff/JavaScript/Bots/configs/config.json if you have further non djs related issues you should ask in #other-js-ts

Did you find this page helpful?