nothing shows up in localhost:3000 after wasp start

Hi everyone, as the picture shows, it says Port 3001 is already in use, opens localhost:3000 and I can't run wasp start. I terminated the process using 3001 using command prompt, tried wasp start again, and got the same error. Anyone able to shed some light on this? Thanks in advance.
No description
No description
10 Replies
Tommy Shelby
Tommy Shelby7mo ago
the back end server runs on port 3001 and the frontend server runs on port 3000. check what service is using port 3001 and terminate it. afterwards start the app again and it should work
northernsky49
northernsky497mo ago
Tried that, still getting an error. in my server.ts file, I get this flagged: Cannot find module 'wasp/server' or its corresponding type declarations.
northernsky49
northernsky497mo ago
I restarted comp. Localhost:3000 opened up properly. Server is listening on Port 3001. Just can't see anything on the frontend, fully blank.
No description
northernsky49
northernsky497mo ago
I wonder if the "Cannot find module 'wasp/server' or its corresponding type declarations." has to do with running it from VS and not from Ubuntu? Post from Martinsos https://github.com/wasp-lang/wasp/issues/48
MEE6
MEE67mo ago
Wohooo @northernsky49, you just became a Waspeteer level 1!
Vinny (@Wasp)
Vinny (@Wasp)7mo ago
hey @northernsky49 🙂 -- let's see if we can get this resolved. first, can you try quitting the main wasp process with ctrl+c, then run wasp clean and then when it's finished run wasp start again if not, please share the error you're gettting from either the terminal or the console within the browser's developer tools
northernsky49
northernsky497mo ago
Hi @Vinny (@Wasp), just followed those steps. In the browser dev tools we have this: Uncaught SyntaxError: The requested module '/@fs/mnt/c/Users/northernsky49/Desktop/New folder/.wasp/out/sdk/wasp/dist/client/operations/index.js' does not provide an export named 'Link' (at Dashboard.jsx:2:20) Screenshots are from VS Code and they show: server.ts .wasp\out\server\src Cannot find module 'wasp/server' or its corresponding type declarations. tsconfig.json .wasp\out\server Cannot find type definition file for 'body-parser'. The file is in the program because: Entry point for implicit type library 'body-parser'
No description
No description
martinsos
martinsos7mo ago
@northernsky49 let's figure this out! 1. What is your OS, what is your wasp version, and what kind of an app are you running -> did you create an app via one of our starters, did you create it from open-saas, or did you create it with Mage / Wasp AI? 2. Was app working at some point and then stopped working? If so, what cause that change? 3. You said you are running it via VC and not via Ubuntu -> you mean you are running it from VSCode's shell, instead of the Ubuntu terminal? What I think is the most likely issue here is that you generated an app with usemage.ai (Wasp AI) and GPT made some mitsakes in it (wrong / made up imports), and now you are getting these error messages because of that. We released new Wasp just a couple of days ago, 0.12, and one thing we are working on in the following day is improvign the error messages as paths are quite confusing, so sorry about that, should get better soon. If you did create an app using Mage, you can share it with us (there is "share" option on usemage.ai) and we can take a look at the generated code, tell you where the issue is.
northernsky49
northernsky497mo ago
Hello @martinsos, I really appreciate you helping me to look into this. :wasplang: 👍 1. My OS is Windows 11, my wasp version is 0.12.3. I created an app with Mage AI. I will attach the link to the file directory to this message. 2. The app has not worked at all. I just see a blank localhost:3000 page, with the wasp favicon and the name of my app beside the favicon. 3. I am running the code in the terminal in VC using Ubuntu (WSL). Here is the shareable link from Mage: https://usemage.ai/result/75dab251-7f61-4d69-b584-ad097e03d297 I think you are correct, let me know if I can provide anything else from my end.
martinsos
martinsos7mo ago
Ok, so GPT (inside Mage) indeed made a mistake. It makes silly mistakes, that is unavoidable, and you will have to fix them yourself. So, in this case, we can read the message:
Uncaught SyntaxError: The requested module '/@fs/mnt/c/Users/northernsky49/Desktop/New folder/.wasp/out/sdk/wasp/dist/client/operations/index.js' does not provide an export named 'Link' (at Dashboard.jsx:2:20)
Uncaught SyntaxError: The requested module '/@fs/mnt/c/Users/northernsky49/Desktop/New folder/.wasp/out/sdk/wasp/dist/client/operations/index.js' does not provide an export named 'Link' (at Dashboard.jsx:2:20)
Message is not super easy to read, but it says that in Dashboard.js, Link import does not exist. If we look at it in the file, we see the following import:
import { useQuery, Link, rewardUser, deleteComment } from 'wasp/client/operations';
import { useQuery, Link, rewardUser, deleteComment } from 'wasp/client/operations';
Ok, so Link must be imported some other way if this is not correct. You can go to https://wasp-lang.dev/docs and search in the top right corner for Link. This will take you to https://wasp-lang.dev/docs/advanced/links, and you can see the import goes like this import { Link } from 'wasp/client/router' . So, update Dashboard.js to import Link like this, and this problem should be fixed! That said, there might be more problems after this one, and you will have to find a way to fix them all. Copilot should be able to help you if you have it in VSCode. Great solution is also https://github.com/paul-gauthier/aider, it can be quite helpful in fixing stuff in Wasp codebase, or even adding features.
Want results from more Discord servers?
Add your server