The application isn't picking up server changes (on Actions.ts).

I make changes and send request from the front end, but it is stuck at older version of file. It shows an error, but reported error is based on the old version of the file. Changes to actions.ts file isn't being picked up.
9 Replies
kapa.ai
kapa.ai6mo 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: ---------------------- This issue might be related to the Wasp build process. When you run wasp start, Wasp compiles your actions.ts file into JavaScript and places it in the .wasp/out/server/dist directory. If the changes you're making aren't being reflected, it could be that the build process isn't picking up the changes. Here are a few things you can try: 1. Restart the Wasp server: Stop the server (usually with Ctrl+C in the terminal), and then start it again with wasp start. This should force a rebuild of your project. 2. Clean the Wasp build: You can use the wasp clean command to delete all the build artifacts. After running this command, start the server again with wasp start. 3. Check your file structure: As per the migration guide (https://wasp-lang.dev/docs/migrate-from-0-11-to-0-12#next-steps) for Wasp, all your source files should be in the src/ directory. Make sure your actions.ts file is in the correct location. 4. Check for import errors: In the support thread (https://discord.com/channels/686873244791210014/1216119302244270181), a user had a similar issue where the import of actions.js failed. Make sure you're importing the actions correctly in your main.wasp file and other places where it's used. If none of these steps work, it would be helpful to have more information about the error you're seeing and the changes you're making to the actions.ts file. ---------------------- 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
neogeofunOP6mo ago
Also tried wasp clean doesn't solve the issue. It did now, but it I have a feeling I will keep having to do this when I run wasp clean, it took the server code to the state it was failing
Don Bugito
Don Bugito6mo ago
I'm having same issue
neogeofun
neogeofunOP6mo ago
I did wasp clean after closing files on editor that seemed to have worked
miho
miho6mo ago
Could you provide us a bit more info about your OS? What kind of changes did you attempt and didn't see the changes?
martinsos
martinsos6mo ago
@neogeofun is this still happening? Are you on WSL on Windows? The more infor you can give us the more it helps!
neogeofun
neogeofunOP6mo ago
I use Ubuntu 22, I closed the IDE and run wasp clean. That resolved the issue.
miho
miho6mo ago
Now you get the server changes as you edit them?
neogeofun
neogeofunOP6mo ago
Yes, I think I do. At the time it happened, I was doing iterations and logging rapidly, so who knows. I had similar issues happen with either nodemon or regular node that would require reset / clear cache long ago as well. Especially when working with vscode.
Want results from more Discord servers?
Add your server