Typescript errors I can't replicate on my own environment

shimshon1
HOBBY

a year ago

hey! trying to deploy my node app written in typescript but it's failing and i'm getting odd typescript error that don't make sense on my end.
i'm assuming railway isn't using my typescript config as my build works locally, is there a way to replicate it and try to solve problems on my local version instead
of redeploying in hopes of solving it? thanks!

0 Replies

a year ago

first off, is the version of node that you run locally the same on railway?


shimshon1
HOBBY

a year ago

based on this:
╔═════════ Nixpacks v1.28.1 ════════╗
║ setup │ nodejs18, npm-9x ║
║───────────────────────────────────║

i'm assuming it uses 18, i applied it and its still working well locally


a year ago

and you are using node 18 locally too?


shimshon1
HOBBY

a year ago

yes, right now i do


a year ago

to try to reproduce locally, have you tried deleting your project and doing a fresh clone? then running through setup, npm ci, npm build, npm start, etc


shimshon1
HOBBY

a year ago

do you mean just cloning it off github again and building it? ill give it a go, but as far as the tsconfig, is it using mine or is the setting it is using specified anywhere?


a year ago

its yours, railway runs your project as-is


a year ago

unlike vercel


a year ago

do you mean just cloning it off github again and building it?

yes but specifically install deps from a frozen lock file


shimshon1
HOBBY

a year ago

ok i just cloned it but it seemed to do the job, i'm seeing the same errors on my editor now and some parameter that used to be "any" now have a type, would love to know why it's hapening


shimshon1
HOBBY

a year ago

could it came from messing with a type file that is inside of node_Modules that was downloaded cleanly by railway? i'm guessing thats it


shimshon1
HOBBY

a year ago

anyways, thanks you


a year ago

I'm sorry but i couldnt begin to tell you why


shimshon1
HOBBY

a year ago

Yeah it was the problem, library i installed was wrongly typed and like a moron i changed it to any on the node_modules type, anyway it's sorted, thank you


a year ago

no problem!


Typescript errors I can't replicate on my own environment - Railway Help Station