keonik / prisma-erd-generator

Generate an ER Diagram based on your Prisma schema every time you run npx prisma generate
https://www.npmjs.com/package/prisma-erd-generator
MIT License
894 stars 52 forks source link

Add a note about `@mermaid-js/mermaid-cli` dependency #178

Closed maticzav closed 1 year ago

maticzav commented 1 year ago

Thank you for this neat generator!

When I tried using it with Prisma 4.10.1 and pnpm, I was getting an error that mmdc command failed.

Command failed: ../../amsterdam/node_modules/mmdc -i /var/folders/lk/g24rtghs1gn_6l6tc9tcdnmm0000gn/T/prisma-erd-UdJgkH/prisma.mmd -o /Users/maticzavadlal/Code/mine/amsterdam/server/prisma/ERD.svg -t forest -c /var/folders/lk/g24rtghs1gn_6l6tc9tcdnmm0000gn/T/prisma-erd-UdJgkH/config.json

After looking into the problem, I was able to resolve it by adding an explicit dependency to @mermaid-js/mermaid-cli.

keonik commented 1 year ago

The installation step says to install this as a dev dependency already.