Skip to content

Conversation

paazmaya
Copy link
Contributor

@paazmaya paazmaya commented Aug 14, 2023

Once every often I have come across the issue where the Prisma client dependency has not been found, even after it was specifically generated.

Looking at

Before npx prisma generate:

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

✔ Generated Prisma Client (5.1.1 | library) to ./prisma/node_modules/@prisma/client in 218ms
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()

After npx prisma generate:

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

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

import { PrismaClient } from './node_modules/.prisma/client'
const prisma = new PrismaClient()

But then reverted

Since there were issues with Docker builds and since "it works most of the time", I gave it a rest.

@paazmaya paazmaya requested a review from pashidlos August 14, 2023 12:46
@paazmaya paazmaya force-pushed the prisma-generation-and-to-5.1.1 branch from 50cb9d9 to 0fe2d10 Compare August 14, 2023 13:13
@paazmaya paazmaya changed the title Update Prisma to v5.1.1 and configure where its client is generated Update Prisma to v5.1.1 and define Node.js 18 LTS as the minimum Aug 14, 2023
Copy link
Member

@pashidlos pashidlos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@paazmaya paazmaya merged commit b647cc4 into master Aug 14, 2023
@paazmaya paazmaya deleted the prisma-generation-and-to-5.1.1 branch August 14, 2023 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants