Skip to content

Server error when running the sample script for Prisma integration #22821

Closed
@syatsuzuka

Description

@syatsuzuka

Existing documentation URL(s)

When I tried to follow the instruction for integrating with D1 through prisma-orm, I got an error with "@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.".

https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/d1/tutorials/d1-and-prisma-orm/index.mdx#5-query-your-database-from-the-worker

What changes are you suggesting?

When I change the code as below, following the instruction in Prisma's web page, it looks working.

//import { PrismaClient } from "@prisma/client";
import { PrismaClient } from "./generated/prisma";

So, it might be better to add a link for the prisma's web page in the instruction.

https://www.prisma.io/docs/orm/prisma-client/setup-and-configuration/introduction#3-importing-prisma-client

Additional information

No response

Metadata

Metadata

Assignees

Labels

content:editRequest for content editsdocumentationDocumentation editsproduct:d1D1: https://developers.cloudflare.com/d1/

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions