why I am facing weird javascript errors on railway servers ?
I am facing weird JS errors only on railway servers ??
it works on production locally, and in other cloud providers.
I tried different node versions but still the same issue!
seems you're building apps and run it in different ways !! that won't make our app works as expected!
20 Replies
Project ID:
N/A
What weird javascript errors are you seeing?
e.g
iam importing a js function and trying to use it like
auth.check(params)
I got undefing auth ??
currently i have connected with heroky, and it works as expected
I think the issue may be in building or how you're start the apprailway doesn't run code differently from any other hosting services as far as I'm aware, what does that function do?
it throws this error
runing localy in prod works as expected
works also at heroku with the same code
actually a lot of other hosting providers do a fair amount of monkey patching to get code to run, railway by contrast runs your code as is, so the best you can do is make sure railway runs your code with the same software you run locally, but beyond that it's a code issue
it works locally without any issues
so i assume the code has no issues
both in dev and in production
unfortunately that does not mean it's not a code issue
seen this a million times, it's the "works on my machine" meme
thanks for your help
what node version is railway using, and what version are you using locally
just trying to lighten up the mood
same node version 20
okay same node versions that's good, this is pointing to a code issue now, as previously mentioned railway runs your code as is
I will try again
Now this works
But this Not
import paths are funky with js
It's handled by tsconfig and should works in all envs
thats ts for you
any thing can help that from your side ?
this isnt an issue with railway? (i also dont work for railway)
okay, thanks for your help appreciated