How to use to deploy node.js / TS?
Hi,
How to use railway to deploy node.js / TS project from an existing repo?
I used Heroku before but not very familiar with railway
How to set scripts that do ts complie then starting index from dist? Does railway uses scripts defined in package.json?
15 Replies
Project ID:
N/A
yes, railway uses the scripts defined in package.json
to use railway, you simply create a new project, provide the github link, add the env variables
and you're done!
it'll build it and then deploy it for you
OK, thanks for your help
I've done so but got build error though the project is working locally
So I don't know if I need some extra config for example?
You shouldn't need to 🤔
make sure typescript is installed on your project's dev dependencies
if you have that, try sending me the build logs using this:
https://bookmarklets.up.railway.app/log-downloader/
then we can debug together :)
Oh Thanks, let me do that
The downloader doesn't work or I'm not sure if missing something
You just need to pop it into your bookmarks, go to your build logs, and then click the bookmark
it'll run js code that downloads your buildlogs
Here's my app log @Fragly
I had to copy the js code into console
So in line #13 you may notice scripts command:
rimraf dist && npx tsc && yarn copy-files
I guess they're not working properly or something
I tried to fix pathes from '../../path/to/some' to './../path/to/some'could you send me your package.json?
dang, yea I'm not sure why it's not working
Yep, really strange
what node version are you using locally?
v18.17.1
dang 🤔