I get a blank page after running "cd <my-project-name>wasp start" (already migrated the db).
In the source code it says javascript must be enabled (see image) but it is enabled in my browser.
I also get the following error in the console: Uncaught SyntaxError: The requested module 'http://localhost:3000/@fs/Users/phplaravel/Desktop/Flashcardsapp-z23my/.wasp/out/sdk/wasp/dist/client/router/index.js' doesn't provide an export named: 'useParams'.
I hope someone can help me. ThaNKS
8 Replies
Hi @Jaïr. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the information provided in the knowledge sources, it appears you're experiencing an issue related to incorrect imports in your Wasp project. This is likely due to a mistake in the generated code, possibly from using Wasp AI (Mage) to create your project. Let's address this step by step:
1. The blank page and JavaScript error are likely related to the import error you're seeing in the console.
2. The specific error you're encountering suggests that there's an incorrect import statement in one of your files:
3. This error is similar to issues reported by other users in the knowledge sources. For example, in the Discord support thread, a user encountered a similar problem with incorrect imports.
To resolve this issue, you should:
1. Check your import statements, particularly those related to routing. The
useParams
hook should be imported from 'react-router-dom' instead of the Wasp SDK.
2. Update the incorrect import. For example, if you have something like:
Change it to:
3. If you created your app using Wasp AI (Mage), it's possible that there are other incorrect imports or generated code issues. You may need to review and correct other parts of your code as well.
4. After making these changes, try running wasp start
again.
If the problem persists or you encounter other issues, you might want to try the following:
1. Run wasp clean
and then wasp start
again to ensure you're working with a fresh build.
2. Check the terminal where you ran wasp start
for any additional error messages that might provide more context.
3. If you used Wasp AI (Mage) to generate your app, consider sharing the generated code with the Wasp team for review. As mentioned in the Discord support thread, you can use the "Share" button on usemage.ai to get a shareable link.
If you continue to face issues after trying these steps, I recommend reaching out to the Wasp community on their Discord channel for more personalized support.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Jaïr, 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?i now see this: ⚠️ React Router Future Flag Warning: Relative route resolution within Splat routes is changing in v7. You can use the
v7_relativeSplatPath
future flag to opt-in early. For more information, see https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath.and this: Failed to load resource: the server responded with a status of 401 (Unauthorized)
it keeps saying 'loading...'
Do you see any errors in the terminal?
Right now, I don't. I also tried different browsers and private tabs.
Can you check the network tab in your browser tools? The page container has loaded, but looks like you perhaps have a stalled request blocking the content from loading
Oh I see that you used Mage, that means that there is an error somewhere in the code logic e.g. importing things that don't exist