From c644eca0bec9a990a7c488c2380c0578f8477fc2 Mon Sep 17 00:00:00 2001 From: Aidan McAlister Date: Thu, 4 Dec 2025 14:35:04 -0500 Subject: [PATCH 1/2] add cjs module format --- content/800-guides/430-nestjs.mdx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/content/800-guides/430-nestjs.mdx b/content/800-guides/430-nestjs.mdx index 0be7bc23c4..ee59f4b97e 100644 --- a/content/800-guides/430-nestjs.mdx +++ b/content/800-guides/430-nestjs.mdx @@ -73,14 +73,16 @@ This creates a new `prisma` directory with the following contents: - `prisma.config.ts`: A configuration file for your projects - `.env`: A [dotenv](https://github.com/motdotla/dotenv) file, typically used to store your database credentials in a group of environment variables -### 2.3. Set the generator output path +### 2.3. Set the generator output path and update the module format -Specify your output `path` for the generated Prisma client either by passing `--output ../src/generated/prisma` during `prisma init`, or directly in your Prisma schema: +Specify your output `path` for the generated Prisma client by either passing `--output ../src/generated/prisma` during `prisma init` or directly in your Prisma schema. Also, update the `moduleFormat` to `cjs`: ```prisma file=prisma/schema.prisma generator client { provider = "prisma-client" output = "../src/generated/prisma" + // add-next-line + moduleFormat = "cjs" } ``` @@ -99,6 +101,8 @@ datasource db { } ``` + + Now, open up `.env` and you should see a `DATABASE_URL` already specified: ```bash file=.env From 73fff55a2d8734f20b8bc634690e09b4e849412a Mon Sep 17 00:00:00 2001 From: Aidan McAlister Date: Thu, 4 Dec 2025 14:35:47 -0500 Subject: [PATCH 2/2] white space removed --- content/800-guides/430-nestjs.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/content/800-guides/430-nestjs.mdx b/content/800-guides/430-nestjs.mdx index ee59f4b97e..11cf0dc431 100644 --- a/content/800-guides/430-nestjs.mdx +++ b/content/800-guides/430-nestjs.mdx @@ -101,8 +101,6 @@ datasource db { } ``` - - Now, open up `.env` and you should see a `DATABASE_URL` already specified: ```bash file=.env