Railway server deployment fail
Hello,
So I am currently trying to deploy my server and db to railway.
I am using railways cli and I am following along in the wasp docs.
When I do railway up, I get:
Build time... (value)
Deploy Complete
Starting Container.
I then start to get a repeated error of this:
It seems its just not finding anything in node_modules/wasp when trying to run.
I haven't changed the Dockerfile.
I am using wasp 0.15.0
I am using MacOS
I have been able to deploy to fly.io
However, I wanted to change to railway.
I have tried cleaning and re-building multiple times, nothing has changed.
3 Replies
Hi @tannerb. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the information provided in your question and the knowledge sources available, it seems you're encountering an issue while deploying your Wasp application to Railway. This error suggests that the deployment process is unable to find certain Wasp-related modules in the Docker container.
Here are a few potential solutions and things to check:
1. Dockerfile:
The Wasp documentation on manual deployment mentions that Wasp generates a Dockerfile for you. Make sure you're using the Dockerfile generated by Wasp in the
.wasp/build/
directory.
2. Node.js version:
You mentioned using Node.js v18.18.0, which is compatible with Wasp. However, it's worth noting that Wasp has specific Node.js version requirements. According to a GitHub issue, Wasp requires Node.js ^18.12.0. Your version meets this requirement, so this is likely not the issue.
3. Wasp version:
You're using Wasp 0.15.0, which is a recent version. However, if you've recently upgraded Wasp, make sure you've also updated your project to accommodate any changes. The migration guide from 0.11.X to 0.12.X mentions changes to the default Dockerfile. Although this doesn't directly apply to your version, it highlights the importance of checking for such changes.
4. Build process:
Ensure you're following all the steps in the Wasp documentation for Railway deployment. Specifically:
- Run wasp build
in your project directory
- Move into the .wasp/build/
directory
- Run railway link
to link your app to your Railway project
- Set up the required environment variables in the Railway dashboard
- Run railway up
5. Clean and rebuild:
You mentioned that you've tried cleaning and rebuilding multiple times. This is a good troubleshooting step. You might also try running wasp clean
in your app directory before rebuilding, as suggested in a Discord support thread.
If none of these solutions work, you might want to:
1. Check if there are any issues with the Railway service itself.
2. Try creating a minimal Wasp project that reproduces the issue and share it with the Wasp team for further investigation.
3. Consider reaching out to Railway support to see if they have any insights on this specific error in the context of deploying Wasp applications.
If you continue to face issues, it might be helpful to share more details about your project structure and the exact steps you're following for deployment.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @tannerb, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?What version of Wasp are you using? Did you customise the
Dockerfile
?I'm using wasp 0.15 and no, I didn't change the dockerfile
I fixed it. Ended up updating to 0.16 and it seemed to fix things. Not sure what the issue was.