IceCrew
IceCrew
Explore posts from servers
NNuxt
Created by IceCrew on 2/8/2025 in #❓・help
Nuxt build move prisma/client to devdependencies
Hello, I am trying to build my project with nuxtbuild when I run the command pnpm run build (npx prisma generate && nuxt build) The client generation works fine
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma

✔ Generated Prisma Client (v5.22.0) to ./node_modules/@prisma/client in 252ms
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma

✔ Generated Prisma Client (v5.22.0) to ./node_modules/@prisma/client in 252ms
but when the build launches, it crashes: ERROR ✘ Failed to generate Prisma Client. I've seen that when the nuxt build command is run, the @prisma/client package is moved from the dependencies to the devDependencies and then updated automatically, which is a problem... I've tried to correct this problem by adding an .npmrc but nothing helped
save-exact=true
auto-install-peers=false
strict-peer-dependencies=false
shamefully-hoist=true
enable-pre-post-scripts=true
prefer-frozen-lockfile=true
dedupe-peer-dependencies=false
save-exact=true
auto-install-peers=false
strict-peer-dependencies=false
shamefully-hoist=true
enable-pre-post-scripts=true
prefer-frozen-lockfile=true
dedupe-peer-dependencies=false
thanks in advance, I don't understand why, I think it comes from nuxt but I can't say why it does the same thing with npm
5 replies
PPrisma
Created by IceCrew on 12/10/2024 in #help-and-questions
Retrieve accurate data
Hi! Hope you're well! I have recipe categories (lasagne, chocolate cake...) that have recipes (vegetarian lasagne, gluten-free chocolate cake...). These recipes have ingredients (butter, eggs...) On the customer's side, I have a selector that allows the user to select the ingredients they want and don't want to have in their search. Example: the user wants recipes that have eggs AND apples, but NO cheese. A recipes with eggs, apples and butter must be displayed. Here's my query:
return await prisma.recipesCategory.findMany({
where: {
recipes: {
some: {
ingredients: {
some: {
ingredientId: {
in: ingredientsIdsWanted
},
},
every: {
ingredientId: {
notIn: ingredientsIdsNotWanted,
},
},
},
},
},
},
});
return await prisma.recipesCategory.findMany({
where: {
recipes: {
some: {
ingredients: {
some: {
ingredientId: {
in: ingredientsIdsWanted
},
},
every: {
ingredientId: {
notIn: ingredientsIdsNotWanted,
},
},
},
},
},
},
});
the problem I have with this query is that it returns the recipe even if it contains only one ingredient in the list, which is normal since there's the some However, if I put an every and the recipe contains additional ingredients, it won't be displayed even if the conditions are met. I've been trying to find a solution for I don't know how long, and I just can't seem to get it, I feel like I'm going crazy or maybe it's simple and I'm looking for too complicated ahah thanks in advance!
8 replies