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.

No output generated

See original GitHub issue

I’ve looked through all the other topical issues and it seems even with the latest version I still cannot get it to produce any output, despite saying it completed just fine 😦

OS: MacOS 12.0.1 package version: 0.6.1

Schema


generator client {
  provider = "prisma-client-js"
}

generator erd {
  provider = "prisma-erd-generator"
  output   = "ERD.png"
}

generator nestgraphql {
  provider               = "node ../../../node_modules/prisma-nestjs-graphql"
  output                 = "../src/@generated/"
  reExport               = Single
  fields_Validator_from  = "class-validator"
  fields_Validator_input = true
}

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

model User {
  /// @validator.IsUUID(all)
  id        String   @id @default(uuid()) @db.Uuid
  /// @Validator.IsEmail()
  email     String   @unique
  /// @Validator.Length(8, 64)
  password  String
  /// @Validator.IsJSON()
  roles     Json[]
  profile   Profile?
  /// @HideField({ output: false, input: true })
  createdAt DateTime @default(now())
  /// @HideField({ output: false, input: true })
  updatedAt DateTime @default(now())
}

model Profile {
  id        String @id @default(uuid()) @db.Uuid
  user      User   @relation(fields: [userId], references: [id])
  userId    String @unique @db.Uuid
  firstName String
  lastName  String
}

Console log says everything is fine

✔ Generated Entity-relationship-diagram to ./prisma/ERD.png in 621ms

But no diagram is produced.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
kefniarkcommented, Dec 7, 2021

Same issue there

✔ Generated Entity-relationship-diagram to .\prisma\prisma-schema.svg in 106ms

But no file to be found anywhere

  • Node 16
  • Windows 10
  • prisma@3.6.x
  • prisma-erd-generator@0.6.1

And similar kind of issue, a node_modules path issue, because I’m using workspaces in this project (but I guess any DnD or modern npm replacement could cause similar issues)

Dirty workaround

Change the path to match the current project folder structure

const mermaidCliNodePath = path.resolve(path.join('node_modules', '.bin', 'mmdc')); // cant find the library
const mermaidCliNodePath = path.resolve(path.join('..', '..', 'node_modules', '.bin', 'mmdc')); // this works in my case

Better workaround

Also install the mermaid-cli as a dev dependency, to make sure it’s available in the local ./node_modules/.bin/

yarn add -D prisma-erd-generator # install this library
yarn add -D @mermaid-js/mermaid-cli # Workaround: install mermaid-cli locally
1reaction
kefniarkcommented, Dec 22, 2021

I confirm, now it throw an error if mermaid-cli is not available locally 👍

Error: 
✔ Generated Prisma Client (3.6.0 | library) to .\node_modules\@prisma\client in 348ms

Error: Expected mermaid CLI at C:\Users\{PROJECT_PATH}\node_modules\.bin\mmdc but this package was not found.

Now I get new trouble in docker deployment, if I try to run prisma generate it explode because the path to the documentation does not exist 😄 But that’s another issue

Prisma schema loaded from prisma/schema.prisma

Output directory "/app/docs/pages/" doesn't exist

Error: Command failed: /app/apps/api/node_modules/.bin/mmdc -i /tmp/prisma-erd-DufAnG/prisma.mmd -o /app/docs/pages/database.svg -t default -c /tmp/prisma-erd-DufAnG/config.json

Sadly I don’t see any argument in prisma generate, to run only certain generators

Read more comments on GitHub >

github_iconTop Results From Across the Web

No output will be generated because there is no Main module
ghc will assume that the main is located in a module called Main (like the compiler says). ghc however has an option -main-is...
Read more >
Note: No relevant classes found. No output generated ... - GitLab
building openmw master shows several Note: No relevant classes found. No output generated messages. (partial log output at bottom of post).
Read more >
moc cpp generation fails with "No relevant classes ... - Qt Forum
No output generated." I have a class D11 that inherits from class B1 that inherits QObject. B1 has declared Q_OBJECT, and so does...
Read more >
000117: Warning empty output generated.—ArcGIS Pro
The output created or modified has no features. For instance, running the Delete Features or Delete Rows tool on a feature class or...
Read more >
Thread: cell.h No relevant classes found. No output generated
cell.h No relevant classes found. No output generated. Hi to all, I've centos6.4 in VM AND Qt5.2.1 I am building a project given...
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