Back

[SOLVED] Console and CLI issue

  • 0
  • Databases
djcali
16 Mar, 2023, 19:20

Hello, I created a new droplet on Digital Ocean with the Appwrite deployment. In the console I created a database named default and a couple of collections, which works great. It seems like I have some kind of disconnect with the Appwrite CLI. When I use the appwrite databases listCollections --databaseId default command it returns ✗ Error Database not found I should also mention I created a function using the CLI and created a deployment. This new function does not show up in my console. Any help apprectiated thanks!

TL;DR
The user was having an issue with the Console and CLI not syncing up. They were unable to see the database they created in the CLI and the function they created through the CLI was not showing up in the console. Solution: The user realized they had created a project and a database in a different section of the console called "Personal Projects". They needed to switch projects in the CLI using 'appwrite init project' and choose the correct project. They also needed to check if the database was created correctly using 'appwrite databases list'.
Emilia
16 Mar, 2023, 19:30

If you use appwrite databases list you can see all the databases you have within the context of your project, it should then also give you the name and ID of the database. Make sure that in the output the database you want to interact with actually has the ID default.

djcali
16 Mar, 2023, 19:34

Hello Emilia. In the CLI I did run that command earlier and it does not list any databases. It returns 0 databases.

Emilia
16 Mar, 2023, 19:35

Are you sure you're in the correct project? Since you did mention making the database through the web-ui.

djcali
16 Mar, 2023, 19:36

How do I check that?

Emilia
16 Mar, 2023, 19:40

I'm actually not sure if you can see which project you're currently in, but you can switch projects using appwrite intit project and then choosing the Link this directory to an existing Appwrite project

djcali
16 Mar, 2023, 19:42

Hi, so when I run this command I get An Appwrite project ( eventlinkup ) is already associated with the current directory. Would you like to override (Y/n) That is the project I created from the console.

djcali
16 Mar, 2023, 19:43

I am guessing the answer is yes, I'm using the correct project

Emilia
16 Mar, 2023, 19:43

Then I'd check the web interface to make sure you actually made the database

Emilia
16 Mar, 2023, 19:44

It would be kind of weird that it wouldn't show up in the CLI if it was actually there

djcali
16 Mar, 2023, 19:49

Ok, I figured it out, Looks like there is a section in the console called "Personal Projects" In that section is where I created a project and the database. There is also a project named eventlinkup, which is the one the CLI is currently using. Thanks for the help. Not sure how I did that.

Emilia
16 Mar, 2023, 19:54

If you do appwrite init project and choose the first option you'll be guided through making a new project, so I'm guessing that's what happened

djcali
16 Mar, 2023, 19:55

Yep. I can see everything now. Thanks for all the help!

Emilia
16 Mar, 2023, 19:56

No worries, glad everything is working now

Drake
16 Mar, 2023, 20:08

[SOLVED] Console and CLI issue

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more