[PR #5531] [MERGED] docs: fix wrong import path in Prisma example #22967

Closed
opened 2026-04-15 21:23:44 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5531
Author: @DavidMarioLC
Created: 10/24/2025
Status: Merged
Merged: 10/25/2025
Merged by: @Bekacru

Base: canaryHead: docs/fix-auth-config-example


📝 Commits (1)

  • 52d735b docs: fix wrong import path in Prisma example

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 docs/content/docs/installation.mdx (+1 -1)

📄 Description

Description:
This Pull Request fixes an incorrect Prisma client import path in the Better Auth configuration documentation.

The docs previously showed the following example, which doesn’t work when the Prisma client is generated with a custom output path:

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

However, the Prisma client is actually generated inside a /client subfolder, so the correct import should be:

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

Changes:

Updated the PrismaClient import example to include the /client subfolder.

Added clarification about the generated client’s location when using a custom output in the Prisma schema.

Verified consistency with the actual Prisma output structure.

Motivation:
This fix helps users avoid runtime errors like:
Cannot find module '@/generated/prisma/runtime/library'
which occur when importing PrismaClient from an incomplete path.

Related:
No direct issue references. Based on reproducible behavior when running npx prisma generate with a custom output path.

Tested locally using pnpm -F docs dev
Validated with BiomeJS
Documentation-only change (no code or runtime impact)


Summary by cubic

Fix incorrect PrismaClient import path in the installation docs: use "@/generated/prisma/client" instead of "@/generated/prisma". Ensures the example works with custom Prisma output and avoids module resolution errors.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/5531 **Author:** [@DavidMarioLC](https://github.com/DavidMarioLC) **Created:** 10/24/2025 **Status:** ✅ Merged **Merged:** 10/25/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `docs/fix-auth-config-example` --- ### 📝 Commits (1) - [`52d735b`](https://github.com/better-auth/better-auth/commit/52d735b22c4d9c4fd01e44623c25842edc6f14b3) docs: fix wrong import path in Prisma example ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/installation.mdx` (+1 -1) </details> ### 📄 Description **Description:** This Pull Request fixes an incorrect Prisma client import path in the Better Auth configuration documentation. The docs previously showed the following example, which doesn’t work when the Prisma client is generated with a custom output path: `import { PrismaClient } from "@/generated/prisma";` However, the Prisma client is actually generated inside a /client subfolder, so the correct import should be: `import { PrismaClient } from "@/generated/prisma/client"; ` **Changes:** Updated the PrismaClient import example to include the /client subfolder. Added clarification about the generated client’s location when using a custom output in the Prisma schema. Verified consistency with the actual Prisma output structure. **Motivation:** This fix helps users avoid runtime errors like: Cannot find module '@/generated/prisma/runtime/library' which occur when importing PrismaClient from an incomplete path. **Related:** No direct issue references. Based on reproducible behavior when running npx prisma generate with a custom output path. ✅ Tested locally using pnpm -F docs dev ✅ Validated with BiomeJS ✅ Documentation-only change (no code or runtime impact) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fix incorrect PrismaClient import path in the installation docs: use "@/generated/prisma/client" instead of "@/generated/prisma". Ensures the example works with custom Prisma output and avoids module resolution errors. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 21:23:44 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#22967