W
Wasp•6mo ago
neogeofun

Migration to 14, should update auth field?

I am using OpenSaas. Right now I am working on migration to v0.14. I followed the guide on the docs, but now userEntity: User causes a type error on main.wasp (undefined identifier, because the entity is no longer on .wasp file I think). Besides Wasp v.0.14, I see changes to the OpenSaas code, such as @src/auth/email-and-pass folder and its code (which requires changes to the main.wasp), there are probably more changes. To get the most up-to-date code for my project, do I need to do anything other than copy and paste the new stuff (or is there an automatic update)?
8 Replies
kapa.ai
kapa.ai•6mo ago
Hi @neogeofun. 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 knowledge sources provided do not contain information about migrating to Wasp v0.14 or about OpenSaas. They mostly cover the migration from Wasp v0.11 to v0.12, particularly focusing on changes in the authentication system. For accurate information, I recommend checking the official Wasp documentation or their GitHub repository for migration guides or release notes related to the version you are migrating to. Here are some useful links: - Wasp Documentation (https://wasp-lang.dev/docs) - Wasp GitHub Repository (https://github.com/wasp-lang/wasp) Remember to always backup your data before performing any migration to prevent any loss. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @neogeofun, 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?
neogeofun
neogeofunOP•6mo ago
I should add that I installed v.0.14 on CLI already. Just stuck at this undefined identifier type-check. For future people. After updating Wasp, restart the terminal. It was the issue. Also during this process, I had a separate little error. Which is an import issue: import { type AuthUser } from 'wasp/auth/types'; Removing /types resolved this issue. So, my only question is the one related to getting most up to date OpenSaas code at this point.
Filip
Filip•6mo ago
For future people. After updating Wasp, restart the terminal. It was the issue.
This is pretty surprising... Thanks for sharing it. Which platform are you on? As for the most up to date code for OpenSaas.... OpenSaas is a template, not a framework. So, once you clone it and start building on it, it becomes your code. You're free to change/add/remove whatever you want, we just gave you something to start on. Unfortunately, the consequence of this is that OpenSaas isn't really meant to be updated. Once you've used the template, it's done its job. Your app is the thing that needs to be updated, and you do it as you would with any other app that doesn't use OpenSaas. That said, if your app shares a lot of code with the OpenSaas template, you may want to go through all the changes manually, see which ones apply to you, and adopt them. Unfortunately, since OpenSaas is a template, there can't be an "automatic" way to do this. It's just boilerplate code someone else wrote for you (like t3, shipfast, etc).
martinsos
martinsos•6mo ago
undefined identifier -> and have you defined a prisma.schema file that has model User in it? Because that is where it should pick it up from. EDIT: Ok I see now that you fixed it,great!
neogeofun
neogeofunOP•6mo ago
I am on Ubuntu 22. Yes, that was my thinking about Open SaaS just making sure I won't do harder work when there is an easier way, so I will do manual updates.
Filip
Filip•5mo ago
Ok, glad we're all on the same page 🙂 If you need any help during the migration, ask away How's it going so far. Did you run into any obstacles?
neogeofun
neogeofunOP•5mo ago
ah, lol, no quite frankly got stuck last couple days thinking UX and business logic, I am building a non-trivial application and so far happy with Wasp for MVP purpose once done i will look into integrating some features from recent updates, seemed like there are some changes to auth hooks so might be handy
Filip
Filip•5mo ago
Yeah, auth hooks have been verh requested, so it's pretty likely you'll find them useful Good luck then and we're here if you need us!
Want results from more Discord servers?
Add your server