10 months 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'
]
}
10 months ago
Hi! What are you trying to deploy? could u explain it?
10 months ago
Are you by any chance commiting your node_modules folder?
10 months ago
No!
10 months ago
also no
10 months ago
how are you deploying it? by committing to a repo?
10 months ago
do you have a .gitignore file in your project?
10 months ago
at the root of it
10 months ago
paste the contents here please
10 months ago
ok, so the issue isn't what I thought it was
10 months ago
are you sure this '../config.json' exists?
10 months 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
10 months ago
glad you could solve it! take a look at your framework docs to see why those files are ignored!
10 months ago
I will close this thread for now, open a new one if you have any other issue
10 months ago
!s
Status changed to Solved medim • 10 months ago