Error after deploying
d1hui
HOBBYOP

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

Solved

26 Replies

d1hui
HOBBYOP

10 months ago

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'

    ]

}


medim
MODERATOR

10 months ago

Hi! What are you trying to deploy? could u explain it?


d1hui
HOBBYOP

10 months ago

its a discord bot that connects a game chat to a discord channel


medim
MODERATOR

10 months ago

Are you by any chance commiting your node_modules folder?


d1hui
HOBBYOP

10 months ago

i think so


d1hui
HOBBYOP

10 months ago

should i not be doing that?


medim
MODERATOR

10 months ago

No!


d1hui
HOBBYOP

10 months ago

ah


d1hui
HOBBYOP

10 months ago

would i just need to remove the folder entirely


medim
MODERATOR

10 months ago

also no


medim
MODERATOR

10 months ago

how are you deploying it? by committing to a repo?


d1hui
HOBBYOP

10 months ago

im using the cli


medim
MODERATOR

10 months ago

do you have a .gitignore file in your project?


medim
MODERATOR

10 months ago

at the root of it


d1hui
HOBBYOP

10 months ago

yes


medim
MODERATOR

10 months ago

paste the contents here please


d1hui
HOBBYOP

10 months ago

actaully it does have the node_modules folder inside


d1hui
HOBBYOP

10 months ago

node_modules/
.prettierrc.json
config.json
auth-cache/
logs/
data/


medim
MODERATOR

10 months ago

ok, so the issue isn't what I thought it was


medim
MODERATOR

10 months ago

are you sure this '../config.json' exists?


medim
MODERATOR

10 months ago

because according to your gitignore, you're excluding it


d1hui
HOBBYOP

10 months ago

oh yea thats weird it seems like all of the excluded things shouldnt be excluded


d1hui
HOBBYOP

10 months ago

yea it works now i think tysm


medim
MODERATOR

10 months ago

glad you could solve it! take a look at your framework docs to see why those files are ignored!


medim
MODERATOR

10 months ago

I will close this thread for now, open a new one if you have any other issue


medim
MODERATOR

10 months ago

!s


Status changed to Solved medim 10 months ago


Loading...