Join the Webstudio community

Updated 2 months ago

The table `public.User` does not exist

At a glance

A community member is trying to install WebStudio locally but is unable to log in due to an error related to the public.User table not existing in the database. The community members discuss potential solutions, including running migrations, checking the database setup, and inspecting the environment configuration. While no definitive answer is provided, the community members suggest checking the database tables and the environment settings to troubleshoot the issue.

Useful resources
I am trying to install WebStudio in my local by following https://docs.webstudio.is/contributing/contributing-for-developers#running-the-webstudio-project-without-devcontainer
I am able to run all the steps successfully but not able to login to the site:
Attached is the error screen. and the error log says:
apps/builder dev: prisma:error
apps/builder dev: Invalid prisma.user.findUnique() invocation:
apps/builder dev: The table public.User does not exist in the current database.
apps/builder dev: {
apps/builder dev: error: PrismaClientKnownRequestError:
apps/builder dev: Invalid prisma.user.findUnique() invocation:
apps/builder dev:
apps/builder dev:
apps/builder dev: The table public.User does not exist in the current database.

Require help on this.
Attachment
image.png
B
M
I
14 comments
You did not run migrations
I ran this command:
pnpm migrations migrate
inside my project root
Attachment
image.png
Did you create database manually or used docker compose in .devcontainer folder?
Used docker compose inside .devcontainer
Maybe you have other database on 5432 port?
~/work/learn_webstudio/webstudio$ sudo lsof -i :5432
[sudo] password for madhukar:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 104545 madhukar 23u IPv4 1882737 0t0 TCP localhost:53012->localhost:postgresql (ESTABLISHED)
I don't see any other db on port 5432
psql -d postgresql://postgres:pass@localhost/webstudio
What tables it shows?
It shows 13 tables including user table
Is there some settings in .env or somewhere else where I need to check if app is connected with db or not?
Add a reply
Sign up and join the conversation on Discord