question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting `Invalid `db.user.findUnique()` trying to register new account after all the setup

See original GitHub issue

I ran npx create-remix@latest --template dev-xo/stripe-stack. Followed instructions. Then ran npm run dev.

Tried to create account but always get this error.

image

Not sure what goes wrong.

I tried to run npm run setup manually but get this error.

npm run setup

> setup
> run-s setup:db setup:seed


> setup:db
> prisma generate && prisma migrate deploy

Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma

✔ Generated Prisma Client (4.5.0 | library) to ./node_modules/@prisma/client in 32ms
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client

import { PrismaClient } from ‘@prisma/client’ const prisma = new PrismaClient()

Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "data.db" at "file:./data.db?connection_limit=1"

1 migration found in prisma/migrations

Error: P3005

The database schema is not empty. Read more about how to baseline an existing production database: https://pris.ly/d/migrate-baseline

ERROR: "setup:db" exited with 1.

I chose SQLite as DB choice.

Thanks for making the template.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nikitavoloboevcommented, Nov 4, 2022

Yes can close issue. I can try debug the issue with pnpm myself. Thanks again.

0reactions
dev-xocommented, Nov 3, 2022

Issue gonna be closed @nikitavoloboev. All good then?

As I know pnpm has issues with Prisma. Not being able to find some modules. Have a search on google in case you wanna know more about it.

Gonna update the Docs leaving people know about this pnpm issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Invalid `prisma.user.findUnique()` invocation: connect ...
I'm getting an Error: Invalid prisma.user.findUnique() invocation: connect ECONNREFUSED ::1:55859 when trying to set up a new calendso ...
Read more >
Invalid prisma.user.findUnique() invocation - Stack Overflow
You have to add validation for username, i.e. ... After looking at your code it seems that the username is missing from your...
Read more >
Prisma Client API (Reference)
In the following query, the values for userName in the where and create options are different, so Prisma Client does not use a...
Read more >
Prisma and TypeScript CRUD Basics - Sabin Adams
I think a good first step to gain a better understanding of Prisma's CRUD capabilities is learning how to create records in our...
Read more >
Invalid Prisma invocation - RedwoodJS Community
Hello here, I'm trying redwoodjs and so far I like it quite much. I'm having issues though with custom reducers & graphql queries....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found