efiber-prisma-schema

raw JSON →
2.2.0 verified Sat Apr 25 auth: no javascript

Provides the Prisma database schema for the eFiber project, enabling Node.js applications to generate and use Prisma Client with the predefined schema. Current stable version is 2.2.0. Adheres to eFiber's data model and is intended for internal use. Does not include migrations or seed data; relies on Prisma's version ^6.19.2 as a peer dependency. Differentiates from custom schema definitions by offering a centralized, versioned schema package.

error Error: Cannot find module '@prisma/client'
cause Prisma Client not generated or installed.
fix
Run 'npx prisma generate --schema=node_modules/efiber-prisma-schema/schema.prisma' and ensure @prisma/client is installed.
error Error: Schema file not found: ./schema.prisma
cause Missing --schema flag pointing to the schema file inside the package.
fix
Use '--schema=node_modules/efiber-prisma-schema/schema.prisma' with prisma commands.
gotcha The package does not include migrations; you must run prisma migrate separately with an existing database or use prisma db push.
fix Run 'npx prisma migrate dev --schema=node_modules/efiber-prisma-schema/schema.prisma' to create migrations.
gotcha Prisma version 6.19.2 is required as a peer dependency; using a different version may cause compatibility issues.
fix Ensure your project uses prisma@^6.19.2.
deprecated Schema file is not directly importable as a module; referencing the file path correctly is critical.
fix Use the full path to schema.prisma in node_modules.
npm install efiber-prisma-schema
yarn add efiber-prisma-schema
pnpm add efiber-prisma-schema

Install schema package and Prisma, generate client, then instantiate and query using PrismaClient.

npm install efiber-prisma-schema prisma@^6.19.2
npx prisma generate --schema=node_modules/efiber-prisma-schema/schema.prisma
# Then in code:
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
const users = await prisma.user.findMany();
console.log(users);
await prisma.$disconnect();