Closed nicodel closed 2 weeks ago
Hey there @nicodel 👋 , thanks for creating the issue. Could you share the generated prisma schema?
Sure. Here it is:
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
posts Post[]
}
model Post {
id Int @id @default(autoincrement())
title String
content String?
published Boolean @default(false)
author User @relation(fields: [authorId], references: [id])
authorId Int
}
Thanks, @nicodel,
As the setup and migration worked fine, it seems Prisma Studio is failing to read the database URL from the nuxt devtools. Could you try using the absolute URL of the SQLite db file and see if that helps:
datasource db {
provider = "sqlite"
url = "file:/Users/janedoe/dev.db" // absolute path to URL
}
Also, can you check whether Prisma Studio works for you manually by running:
npx prisma studio
What OS and version are you using? I'm wondering if this issue might be related.
Hello @ankur-arch ,
I tried to use the absolute path, but got the same error message.
datasource db {
provider = "sqlite"
url = "file:/home/nicodel/dev/countdowns/prisma/dev.db"
}
But the Prisma Studio alone do not fire errors:
$ npx prisma studio
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Prisma Studio is up on http://localhost:5555
I am running under Debian 12 (bookworm).
If I understood the issue you mentioned, nitropack needs to be >0.5.0, I got 2.9.7:
$ yarn list --pattern nitropack
yarn list v1.22.22
└─ nitropack@2.9.7
Thanks for all the details @nicodel. I can't seem to reproduce this 😞 , would you have a reproduction of this I can use?
Hello @ankur-arch ,
My project is stored in a GitLab repository. Please navigate to the nuxt-prisma
branch to get the code concerned by this issue.
Update on this, the app is working smoothly in my macos. I'll try reproducing this in linux and see if it's an OS specific issue.
Thanks for working on this
Hey @nicodel 👋 , we couldn't reproduce this issue 😞 .
I'm closing this and will add an additional param to pass the url of prisma studio ( that will possibly be fix the issue you're facing ).
Hello,
I have been trying out
nuxt-prisma
to access sqlite3 databse from Nuxt application.When I run
yarn dev
, setup seems fine and server starts fine, but when I go in the brower and I open the Prisma Studio I get the following error:The install on
nuxt-install
is clean, with the default Models inprisma.schema
and a sqlite database with below URL: