Troubleshooting
This guide helps resolve common issues when working with Prisma Postgres.
The --db
option is not recognized when running prisma init
Problem
Running the following command fails because the --db
option is not recognized:
npx prisma init --db
Cause
This can occur due to npx caching. If you've previously run npx prisma init
, your machine may be using an outdated cached version that doesn't recognize the --db
flag because it was only introduced in a later version of Prisma ORM.
Solution
Explicitly run the latest
Prisma CLI version:
npx prisma@latest init --db
This ensures that you're using the most up-to-date CLI, preventing issues with outdated command syntax.
Warning: In production, we recommend using prisma generate --no-engine
Problem
You're seeing the following error in your logs:
prisma:warn: In production, we recommend using 'prisma generate --no-engine'
Cause
Prisma ORM by default uses a query engine binary that's deployed as part of the @prisma/client
package. However, with Prisma Postgres, this is not needed.
Solution
To remove this warning and generate Prisma Client without the query engine, you can run the following command:
npx prisma generate --no-engine
Workspace plan limit reached when running prisma init --db
Problem
When running the command:
npx prisma@latest init --db
You may encounter the following error message in your logs:
Workspace plan limit reached for feature "Project".
Cause
Your default workspace project limit has been reached.
Solution
To resolve this issue, consider the following options:
- Configure a different Workspace as your default—one that has available capacity for additional projects.
- Delete unused projects or databases from your current default Workspace to free up space.
- Ensure that you are logged into the correct account in the Prisma CLI. For more details on authentication and account management, please refer to the Prisma CLI documentation.
- Upgrade to a plan that supports more projects in your default Workspace.
Implementing one or more of these solutions should help you overcome the plan limit issue.