question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I have a schema with a few tables, models omitted in the sample. Whenever I run npx prisma generate, the generator tells me that it has generated ./prisma/ERD.svg , but the file does not show up in ../prisma.

Debugger attached.
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma

✔ Generated Prisma Client (2.28.0) to ./node_modules/@prisma/client in 290ms

✔ Generated Entity relationship diagram to ./prisma/ERD.svg in 828ms
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client

Im using

  "dependencies": {
    "@next-auth/prisma-adapter": "^0.5.3",
    "@prisma/client": "^2.28.0",
    ...
  },
  "devDependencies": {
    "prisma": "^2.28.0",
    "prisma-erd-generator": "^0.3.3"
  }

My schema looks like so, models omitted in the sample:

generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["orderByRelation"]
}

generator erd {
  provider = "prisma-erd-generator"
}

datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rhufskycommented, Aug 4, 2021

Thanks a lot, now it works, I could generate a nice PDF ERD.

1reaction
rhufskycommented, Jul 31, 2021

Sorry, I forgot to say, I tested on MacOS 11.5 and node v14.17.3.

I have now reduced my schema.prisma to the absolute minimum:

generator erd {
  provider = "prisma-erd-generator"
}

datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
}

model mytable {
  id        Int    @id @default(autoincrement())
  shortname String @unique @db.VarChar(50)
}

When run prisma generate, it looks like so:

 npx prisma generate

Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma

✔ Generated Prisma Client (2.28.0) to ./node_modules/@prisma/client in 81ms

✔ Generated Entity relationship diagram to ./prisma/ERD.svg in 283ms
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()

Still no ERD.svg in ./prisma/.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No Output devices found? - Microsoft Community
2. Go to File Explorer, right-click This PC then click Properties. And on the left pane, click Advanced system settings > Hardware (tab)...
Read more >
Fixed: “No Audio Output Device Is Installed” Error on Windows
In this guide, SoftwareKeep Experts will show you how to fix “No Audio Output Device Is Installed” Error on Windows 10. Let's get...
Read more >
5+ Methods: Fix No Output or Input Devices Found Windows ...
Sometimes, no output devices found problems may be caused by a disabled output device. If so, you need to reenable it manually. ......
Read more >
"No Audio Output Device is Installed" Error Windows 10
Experiencing a "No Audio Output Device is Installed” Error in Windows 10? We share 3 ways to fix the “No Audio Output Device...
Read more >
No Audio Output Device is Installed [Fixed on Windows 10 PC]
How to Fix the No Audio Output Device Is Installed Error by Updating Audio Driver ... Step 1: Click on Start (Windows logo)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found