W
Wasp-lang•5mo ago
winphan199

Database not started on setting up the project

I have just worked with Wasp-lang and trying to run the first project. The error occurs when I try to wasp start. It said the database is not started even though it is SQlite DB. Wasp version: 0.13.2 System: MacOS M1
No description
11 Replies
kapa.ai
kapa.ai•5mo ago
Hi @winphan199. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- It seems like you're having trouble starting the database for your Wasp project. Here are a few steps you can follow to troubleshoot this issue: 1. Check your database URL: Make sure you've set the DATABASE_URL correctly in your .env.server file. If you're using SQLite, the URL should look something like sqlite:./dev.db. If the file doesn't exist, create it in the root directory of your Wasp project. source (https://wasp-lang.dev/docs/data-model/backends#connecting-to-a-database) 2. Start the database manually: You can try starting the database manually using the wasp start db command. This command starts a default PostgreSQL dev database for you. Your Wasp app will automatically connect to it. source (https://wasp-lang.dev/docs/general/cli#project-commands) 3. Clean the project: If the above steps don't work, you can try cleaning the project using the wasp clean command. This command removes all generated code and other cached artifacts. If you're using SQLite, it also deletes the SQLite database. source (https://wasp-lang.dev/docs/general/cli#project-commands) If you're still having trouble, it might be a bug with Wasp. You can report it on their Github issues page (https://github.com/wasp-lang/wasp/issues). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @winphan199, 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?
winphan199
winphan199•5mo ago
It is till not fixed for me.
miho
miho•5mo ago
even though it is SQlite DB
The error won't be triggered if the DB is SQlite, so this is quite curious 😄 How does your Wasp file look like? Did you save the Wasp file after changing the DB type?
winphan199
winphan199•5mo ago
I haven't change any setting yet. I just create the new wasp project. Then cd into it and wasp start. I just checked. It seems to be related to permission issue. Do you have any idea how ti fix it. The command run well with sudo
miho
miho•5mo ago
Which OS are you running? What did you do to fix the issue? Did you install Wasp with sudo or did you create the new app with sudo? cc: @sodic @martinsos
winphan199
winphan199•5mo ago
Im using macos m1. I just basically run sudo wasp start. And it works fine
MEE6
MEE6•5mo ago
Wohooo @winphan199, you just became a Waspeteer level 1!
winphan199
winphan199•5mo ago
But it means everytimes i want to start my wasp app. I have to run it with sudo
miho
miho•5mo ago
That's weird, could you maybe run wasp uninstall and then install it again? Don't run cURL with sudo
curl -sSL https://get.wasp-lang.dev/installer.sh | sh
curl -sSL https://get.wasp-lang.dev/installer.sh | sh
winphan199
winphan199•5mo ago
Hi. I managed to fix the problem by unstall current nodejs and reinstall it using nvm. My previous node was installed through prebuilt installer for macOS.
miho
miho•5mo ago
Alright! That's good to know for the future 🙂
Want results from more Discord servers?
Add your server