W
Wasp-lang•8mo ago
roreecedev

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.
No description
8 Replies
Filip
Filip•8mo ago
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?
roreecedev
roreecedev•8mo ago
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.
roreecedev
roreecedev•8mo ago
Let me know if there's anything I can assist with @Filip
Filip
Filip•8mo ago
Hey, @roreecedev, I figured it out. The solution Define your App component to accept children, like this:
const App = (_children) => {
// ...
}
const App = (_children) => {
// ...
}
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.
roreecedev
roreecedev•8mo ago
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!
martinsos
martinsos•8mo ago
@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?
Filip
Filip•8mo ago
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)
Want results from more Discord servers?
Add your server