I used the discord.js guide for Economy System and i get this error:
Error: Cannot find module './models/UserItems.js'
Require stack:
- /home/runner/Banky/dbObjects.js
- /home/runner/Banky/index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/runner/Banky/dbObjects.js:12:19)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
Can anybody help me how to fix it?
This is my path:
CodePudding user response:
You are requiring UserItems.js
not UsersItems.js
.
... = require('./models/UserItems.js'); ❌
... = require('./models/UsersItems.js'); ✅