Need help deploying application to Fly.io
Hi! I am having some issues with deploying my app to fly.io. I am using the open-saas template and I have created a simple notes apps that I am trying to deploy. I keep getting an error regarding 'src/router.tsx' but when I search the files I cannot find a file by that name anywhere. Please attached images for error. If anyone has any ideas I would appreciate it. So far I tried finding the file but could not find it. I also tried updating wasp and updating react versions. I also googled the error and searched the wasp discord but haven't found a solution that works yet.
8 Replies
Hey @roreecedev, thanks for trying out Wasp!
This sure is a weird error. I haven't seen it before so I don't know how to fix it off the top of my head, but I can definitely help you troubleshoot and debug.
Can you maybe share your code/github repo with me?
Hi @Filip Thank you so much I would appreciate it! Here is the link for my repo: https://github.com/RoReeceDev/Ascending_Notes_SaaS
GitHub
GitHub - RoReeceDev/Ascending_Notes_SaaS
Contribute to RoReeceDev/Ascending_Notes_SaaS development by creating an account on GitHub.
Let me know if there's anything I can assist with @Filip
Hey, @roreecedev, I figured it out.
The solution
Define your
App
component to accept children, like this:
What happened?
The top-level App
component in open-saas is used to wrap all other components in your app (as it says here).
This means that the rest of the code is going to pass children components to App
. You changed App
's defintion and removed the argument, which created an error: There's code that's passing the children into your app component, but the App
component's definition doesn't allow for any arguments. Read more about this error here.Hi @Filip Thank you so much! This worked and my app is live now !!🥹 Also thank you for the docuentation and links as well, I'm still new to typescript so they definitely help me understand the issue better!
@Filip I wonder if we cn somehow improve the error message that Wasp produced in this case? It seems it was quite hard to figure this out from it?
We definitely should. The TS type already takes care of it by requiring children, but that doesn't work if you don't assign it.
We should fail the build whenever we detect a root component that doesn't take children (as that's definitely some kind of a mistake)
Here it is: https://github.com/wasp-lang/wasp/issues/1908
GitHub
Improve error message when root component takes no arguments · Issu...
See this Discord thread for details: https://discord.com/channels/686873244791210014/1219134547711758416/1219357068922716312