We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The generate function runs successfully, but there is no output file....
Version: "prisma-class-generator": "^0.2.9",
schema.prisma:
generator client { provider = "prisma-client-js" } generator prismaClassGenerator { provider = "prisma-class-generator" } datasource db { provider = "postgresql" url = env("DATABASE_URL") } model User { id Int @id @default(autoincrement()) email String @unique name String? posts Post[] } model Post { id Int @id @default(autoincrement()) title String content String? published Boolean? @default(false) author User? @relation(fields: [authorId], references: [id]) authorId Int? }
npx prisma generate output:
Environment variables loaded from .env Prisma schema loaded from prisma\schema.prisma prisma:info [Prisma Class Generator]:Handler Registered. prisma:info [Prisma Class Generator]:[dryRun] Generate C:\Users\Noel\Documents\source\vesta-new\vesta-nestjs\src\_gen\prisma-class\user.ts import { Post } from './post'; import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; export class User { @ApiProperty({ type: Number }) id: number; @ApiProperty({ type: String }) email: string; @ApiPropertyOptional({ type: String }) name?: string; @ApiProperty({ isArray: true, type: () => Post }) posts: Post[]; } prisma:info [Prisma Class Generator]:[dryRun] Generate C:\Users\Noel\Documents\source\vesta-new\vesta-nestjs\src\_gen\prisma-class\post.ts import { User } from './user'; import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; export class Post { @ApiProperty({ type: Number }) id: number; @ApiProperty({ type: String }) title: string; @ApiPropertyOptional({ type: String }) content?: string; @ApiPropertyOptional({ type: Boolean }) published?: boolean; @ApiPropertyOptional({ type: () => User }) author?: User; @ApiPropertyOptional({ type: Number }) authorId?: number; } prisma:info [Prisma Class Generator]:[dryRun] Generate C:\Users\Noel\Documents\source\vesta-new\vesta-nestjs\src\_gen\prisma-class\index.ts import { User as _User } from './user'; import { Post as _Post } from './post'; export namespace PrismaModel { export class User extends _User {} export class Post extends _Post {} export const extraModels = [User, Post]; } ✔ Generated Prisma Client (v5.10.2) to .\node_modules\@prisma\client in 67ms ✔ Generated Prisma Class Generator to .\src\_gen\prisma-class in 80ms
The text was updated successfully, but these errors were encountered:
Omg I found it, you need dryRun=false, since its true by default.. Maybe update the tutorial to include this?..
output = "../src/_gen/prisma-class" dryRun = "false" separateRelationFields = "false"
Sorry, something went wrong.
📃 docs: fix kimjbstar#59
2b93d45
Successfully merging a pull request may close this issue.
The generate function runs successfully, but there is no output file....
Version:
"prisma-class-generator": "^0.2.9",
schema.prisma:
npx prisma generate output:
The text was updated successfully, but these errors were encountered: