Getting Updates to the Open SaaS Template (not working?)

I am following the guide in Getting Started, however I get the attached error in the last step.
No description
11 Replies
kapa.ai
kapa.ai•7mo ago
Hi @Ricardo Batista. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The error message you're encountering isn't specified in your question, and the knowledge sources provided don't contain information about a specific error during the last step of the Getting Started guide for OpenSaaS. However, here are a few general troubleshooting steps you can try: 1. Ensure you have the correct versions of Node.js and npm installed. Some users have reported issues with specific versions. 2. If you're encountering issues with the database migration, ensure you have correctly set up your database and that the database server is running. 3. If you're seeing a Role postgres does not exist error, this could indicate an issue with your PostgreSQL setup. Make sure the PostgreSQL role and database exist and that the role has the correct permissions. 4. If you're seeing an npm install failed error, try manually installing npm and ensure it's correctly installed. 5. If you're encountering issues with Docker, ensure you have correctly installed and configured Docker. Some users have reported that installing Docker Desktop resolved their issues. 6. If you're using WSL, you might find this guide helpful: Guide: Windows Development with Wasp and WSL (https://wasp-lang.dev/blog/2023/11/21/guide-windows-development-wasp-wsl) If none of these steps resolve your issue, could you please provide more details about the error you're encountering? This will help us provide a more accurate solution. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Ricardo Batista, 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?
miho
miho•7mo ago
This seems git specific in a way that you are trying to get some updates for the wasp-lang/open-saas repo but you have your own local changes? @kapa.ai the error says "fatal: refusing to merge unrelated histories" after running "git merge upstream/main"
kapa.ai
kapa.ai•7mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- The error message "fatal: refusing to merge unrelated histories" typically occurs when you're trying to merge two Git repositories that don't share a common commit history. This can happen if you initialized a new repository in your project directory and made commits before cloning or pulling from the wasp-lang/open-saas repository. To resolve this issue, you can use the --allow-unrelated-histories option with the git merge command. This tells Git to merge the two repositories despite their unrelated commit histories. Here's how you can do it:
git merge upstream/main --allow-unrelated-histories
git merge upstream/main --allow-unrelated-histories
Please note that this can lead to conflicts if the same files have been modified in both repositories. You'll need to resolve these conflicts manually. Remember, it's always a good idea to backup your work before performing operations that can modify your commit history. For future projects, if you want to track changes and collaborate using the OpenSaaS template, it's recommended to first clone the wasp-lang/open-saas repository, then make your changes. This way, you'll have a common commit history and can pull updates without issues. For more information on how to handle Git repositories and updates, you can refer to the Git documentation (https://git-scm.com/doc). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @miho, 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?
Ricardo Batista
Ricardo BatistaOP•7mo ago
hey @miho, yes I customized OpenSaaS but only to some extent. I will have a look later at the @kapa.ai's suggestion of git merge upstream/main --allow-unrelated-histories.
kapa.ai
kapa.ai•7mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- I'm glad you found the suggestion helpful! Just to reiterate, the git merge upstream/main --allow-unrelated-histories command will allow you to merge your changes with the updates from the wasp-lang/open-saas repository, even if they don't share a common commit history. Here's the command again for reference:
git merge upstream/main --allow-unrelated-histories
git merge upstream/main --allow-unrelated-histories
Remember, this operation can lead to conflicts if the same files have been modified in both repositories. You'll need to resolve these conflicts manually. Always make sure to backup your work before performing such operations. For more information on how to handle Git repositories and updates, you can refer to the Git documentation (https://git-scm.com/doc). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Ricardo Batista, 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?
Ricardo Batista
Ricardo BatistaOP•6mo ago
@kapa.ai there was a guide to update OpenSaaS, but not anymore. How do you suggest I update it?
kapa.ai
kapa.ai•6mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- To update your OpenSaaS project, you can follow these general steps: 1. Backup your work: Always ensure you have a backup of your work before performing any operations that can modify your commit history. 2. Fetch the latest changes: You can fetch the latest changes from the wasp-lang/open-saas repository using the git fetch command. If you have set up a remote named upstream that points to the wasp-lang/open-saas repository, you can do this with the following command:
git fetch upstream
git fetch upstream
3. Merge the changes: After fetching the changes, you can merge them into your current branch. If you're on the main branch, you can do this with the following command:
git merge upstream/main
git merge upstream/main
If your repository doesn't share a common commit history with the wasp-lang/open-saas repository, you might encounter an error. In this case, you can use the --allow-unrelated-histories option to merge the repositories:
git merge upstream/main --allow-unrelated-histories
git merge upstream/main --allow-unrelated-histories
Please note that this can lead to conflicts if the same files have been modified in both repositories. You'll need to resolve these conflicts manually. 4. Update your Wasp binary: If there are updates to the Wasp binary, you'll need to install the new version on your development machine. You can do this with the following command:
npm install -g wasp
npm install -g wasp
5. Update your codebase: If there are breaking changes in the new version of Wasp, you'll need to update your codebase to work with the new version. The Wasp team provides detailed instructions and scripts to help with this process for major updates. Remember, it's always a good idea to test your application thoroughly after updating to ensure everything still works as expected. For more information on how to handle Git repositories and updates, you can refer to the Git documentation (https://git-scm.com/doc). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Ricardo Batista, 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?
Vinny (@Wasp)
Vinny (@Wasp)•6mo ago
we removed this as it's too messy most of the updates are small and semantic anyway and doesn't actually change the behavior of the template, so if things are working for you then it's all good
Ricardo Batista
Ricardo BatistaOP•6mo ago
Exactly - I was planning on updating because of this thread, but it is just easier to go directly to the file
Vinny (@Wasp)
Vinny (@Wasp)•6mo ago
yep. that's what I should have suggested 🙂
martinsos
martinsos•5mo ago
@Ricardo Batista and docs will soon also be udpated to remove those instructions about updates! We will release new version together with new opensaas verison
Want results from more Discord servers?
Add your server