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](https://cdn.answeroverflow.com/1231924377516245012/Screenshot_2024-04-22_at_14.07.23.png)
11 Replies
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?It is till not fixed for me.
even though it is SQlite DBThe 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?
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
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 @martinsosIm using macos m1. I just basically run sudo wasp start. And it works fine
Wohooo @winphan199, you just became a Waspeteer level 1!
But it means everytimes i want to start my wasp app. I have to run it with sudo
That's weird, could you maybe run
wasp uninstall
and then install it again?
Don't run cURL with sudo
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.
Alright! That's good to know for the future 🙂