a year ago
hi, i do not know much about all the code, but it runs successfully on my computer but has this issue when i run through railway
is there a fix for this?
project id: a905169b-c3cb-4af1-a24e-5b5fac02d6cb
26 Replies
Starting Container
Error: Cannot find module '../config.json'
Require stack:
/usr/src/app/src/Logger.js
/usr/src/app/src/minecraft/handlers/ErrorHandler.js
/usr/src/app/src/minecraft/MinecraftManager.js
/usr/src/app/src/Application.js
/usr/src/app/index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1149:15)
at Module._load (node:internal/modules/cjs/loader:990:27)
at Module.require (node:internal/modules/cjs/loader:1237:19)
at require (node:internal/modules/helpers:176:18)
at Object. (/usr/src/app/src/Logger.js:4:16)
at Module._compile (node:internal/modules/cjs/loader:1378:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1437:10)
at Module.load (node:internal/modules/cjs/loader:1212:32)
at Module._load (node:internal/modules/cjs/loader:1028:12)
at Module.require (node:internal/modules/cjs/loader:1237:19) {
code: 'MODULENOTFOUND',
requireStack: [
'/usr/src/app/src/Logger.js',
'/usr/src/app/src/minecraft/handlers/ErrorHandler.js',
'/usr/src/app/src/minecraft/MinecraftManager.js',
'/usr/src/app/src/Application.js',
'/usr/src/app/index.js'
]
}
a year ago
Hi! What are you trying to deploy? could u explain it?
a year ago
Are you by any chance commiting your node_modules folder?
a year ago
No!
a year ago
also no
a year ago
how are you deploying it? by committing to a repo?
a year ago
do you have a .gitignore file in your project?
a year ago
at the root of it
a year ago
paste the contents here please
a year ago
ok, so the issue isn't what I thought it was
a year ago
are you sure this '../config.json' exists?
a year ago
because according to your gitignore, you're excluding it
oh yea thats weird it seems like all of the excluded things shouldnt be excluded
a year ago
glad you could solve it! take a look at your framework docs to see why those files are ignored!
a year ago
I will close this thread for now, open a new one if you have any other issue
a year ago
!s
Status changed to Solved medim • 11 months ago