P
Prismaโ€ข2mo ago
Aguix

schema.prisma not found after changing the location

Hello, I'm new in NuxtJS and I'm trying to add Prisma to my NuxtJS environment. So I followed the steps https://nuxt.com/modules/prisma. When I do that, prisma auto create : - A ./lib folder with prisma.ts file inside - A ./prisma folder with schema.prisma file inside The thing is I want to place the schema.prisma file in my ./server/prisma folder and not in a prisma folder at the root of the NuxtJS project. For doing that I followed the steps here : https://www.prisma.io/docs/orm/prisma-schema/overview/location#prisma-schema-location so I have in my package.json file :
"prisma": {
"schema": "./server/prisma/schema.prisma"
}
"prisma": {
"schema": "./server/prisma/schema.prisma"
}
The problem is when I do a npm run dev or prisma migrate dev the CLI didn't find the schema.prisma file and recreate the file at the default location (./prisma/schema.prisma) (Screenshot 1) BUT at the end of the processes he said "Prisma schema loaded from server\prisma\schema.prisma" (Screenshot 2) Any idea why that happened ?
No description
No description
11 Replies
Nurul
Nurulโ€ข2mo ago
Hey ๐Ÿ‘‹ Thank you for reporting this behaviour. This looks like a bug to me. Do you mind creating a GitHub Issue with this link so that our ORM team can have a look? https://github.com/prisma/prisma/issues/new?assignees=&labels=kind%2Fbug&projects=&template=bug_report.yml
Aguix
AguixOPโ€ข2mo ago
Hello, thank you for your response! I didn't create an issue but I will do it right away.
Aguix
AguixOPโ€ข2mo ago
@Nurul (Prisma) I created the ticket, is it good or is there information missing ? Link : https://github.com/prisma/prisma/issues/25389
GitHub
schema.prisma not found after changing the location in NuxtJS ยท Iss...
Bug description In a NuxtJS project, when you change the location of the schema.prisma in the package.json and you do a npm run dev at the start of the process it says that the schema is not found ...
Nurul
Nurulโ€ข2mo ago
Looks good! Thanks for creating the issue ๐Ÿ™
Aguix
AguixOPโ€ข2mo ago
Np ! Now I created an issue but maybe one day I'll solve the issues... @Nurul (Prisma) I found a way to fix the issue, how can I submit it ? I do a fork of the nuxt prisma project (https://github.com/prisma/nuxt-prisma), add my change, test my fix and do a merge request ?
Aguix
AguixOPโ€ข2mo ago
No description
Nurul
Nurulโ€ข2mo ago
Hey @Aguix Yes, that would be great! Our concerned team will respond to your PR ๐Ÿ™
Aguix
AguixOPโ€ข2mo ago
Ok ! Sorry for all the questions, but on my fork I do the changes on the main branch or I create a new one ?
Nurul
Nurulโ€ข2mo ago
I think you can directly make changes on main branch of your fork and then create a PR from main branch of your fork to the official nuxt-prisma repository
Aguix
AguixOPโ€ข2mo ago
Ok I will do that then. Thanks !
Nurul
Nurulโ€ข2mo ago
No worries
Want results from more Discord servers?
Add your server