W
Wasp-langβ€’6mo ago
ChilledGab

Issues after fly.io deployment

Hello! I followed the instructions to deploy on fly.io, and after I did it, plenty of errors appeared in my VScode files for the project, and they're all about missing modules. I guess the deployment moved or removed some files somehow, but then how do I test locally before deploying if I can't because of many missing modules? In the deployed website the 'Log in' button in the landing page was disappeared completely, I read that it might be related to non existing API for Sendgrid, is it true? If so, is there a way to get rid of this problem? Atm I don't want to send any email so I don't need Sendgrid. Now my whole file is corrupted with missing modules, how do I restore it? Is there any 'undeploy' command? I tried to destroy the app but didn't solve anything. (No unfortunately I didn't do version control before modules disappeared) (Most of errors are in lines like: import { HttpError } from 'wasp/server'; Cannot find module 'wasp/server' or its corresponding type declarations.ts(2307) Sorry for the many questions, and thank you for your patience.
5 Replies
kapa.ai
kapa.aiβ€’6mo ago
Hi @ChilledGab. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hello! It seems like you're encountering a few different issues, so let's tackle them one by one. 1. Missing Modules: The error message you're seeing in VSCode about missing modules is likely due to the Wasp version you're using. There was a bug fix related to imports in Wasp 0.12.4. You can check your Wasp version by running wasp version in your terminal. If you're not on at least version 0.12.4, you can upgrade by running curl -sSL <https://get.wasp-lang.dev/installer.sh> | sh -s -- -v 0.12.4 source (https://discord.com/channels/686873244791210014/1223671727943319584). 2. 'Log in' Button Disappearance: The 'Log in' button might disappear if the isUserLoading variable is truthy. This could happen if the server is not responding. You can check this by opening the dev tools in your browser and looking at the "Network" tab. If requests to the server are taking a long time or failing, this could be the issue. You can also check the logs on your Fly dashboard to see if the server is getting requests from the client or reporting any errors source (https://discord.com/channels/686873244791210014/1217941277979574315). 3. Sendgrid API: If you're not planning to send any emails, you don't need to set up the Sendgrid API. However, if you've already set it up and it's causing issues, you might need to remove or comment out any code that's using it. 4. Restoring Files: Unfortunately, there's no 'undeploy' command in Wasp. However, Wasp generates all the code it deploys to the .wasp/build folder. You can inspect the web-app and server folders in there to see if you can find the missing modules. If you can't find them, you might need to manually add them back into your project source (https://discord.com/channels/686873244791210014/1223671727943319584). I hope this helps! Let me know if you have any other questions. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @ChilledGab, 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?
ChilledGab
ChilledGabOPβ€’6mo ago
(Btw, I tried already with wasp clean and wasp start) Now I copied the content of package.json from your github page to my code, closed vscode re-opened, and not sure what happened but now it works locally. Do you know what's the best way to go to develop locally, and then deploy? Just a high level overview, like what's the common practice, because what I imagine is I deploy, then if i need to change stuff I do it on my Localhost, and then deploy, etc... Does it make sense? Would you also know why the Log in button doesn't appear on the deployed version but it does on localhost (I authorized that domain on Google)?
MEE6
MEE6β€’6mo ago
Wohooo @ChilledGab, you just became a Waspeteer level 1!
miho
mihoβ€’6mo ago
Now my whole file is corrupted with missing modules, how do I restore it? Is there any 'undeploy' command? I tried to destroy the app but didn't solve anything. (No unfortunately I didn't do version control before modules disappeared)
Stuff like that can happen due to Wasp recompiling the code and moving stuff around that Typescript compiler doesn't pick up right away. The best solution in that case is to Restart the Typescript Language Server (part responsible for the intellisense): https://tinytip.co/tips/vscode-restart-ts/
Now I copied the content of package.json from your github page to my code, closed vscode re-opened, and not sure what happened but now it works locally.
Yep, closing and opening VS Code again restarts the Typescript language serve as well so that helped πŸ™‚
Just a high level overview, like what's the common practice, because what I imagine is I deploy, then if i need to change stuff I do it on my Localhost, and then deploy, etc... Does it make sense?
That's how most people do it πŸ™‚ You develop in your local environment, test stuff, break stuff and then when you are satisfied, deploy to your production envrionment.
Would you also know why the Log in button doesn't appear on the deployed version but it does on localhost (I authorized that domain on Google)?
I can't really say, maybe @Vinny (@Wasp) can help with the last bit πŸ™‚
Restart TypeScript server in VS Code with a command
tinytip is a collection of small tips & tricks for developers.
martinsos
martinsosβ€’6mo ago
Just to be clear, Wasp is certainly not deleting any of the your code from your project -> the only files it generates / deletes are in .wasp/ directory, which you can completely clean/reset with wasp clean. So if wasp clean doesn't fix it, then something else is in play, possibly some misconfiguration on your side. What can help us to debug is if you explain the state before the issue and after. As for version control, I would super strongly advise doing it, you can't really do anything serious without it.
Want results from more Discord servers?
Add your server