pantharshit00 / prisma-docs-generator

Prisma generator for automatically generating documentation reference from the Prisma schema.
MIT License
578 stars 27 forks source link

Cannot read property 'map' of undefined with Prisma v2.15 #24

Closed codeslayer1 closed 3 years ago

codeslayer1 commented 3 years ago

I am getting this error when running npx prisma generate. I am using Prisma v2.15 and nativeTypes

Error: 
✔ Generated Prisma Client (2.15.0) to ./node_modules/@prisma/client in 3.69s

TypeError: Cannot read property 'map' of undefined
    at TOCGenerator.getTypes (/Users/akash/Documents/kaamwork/kaamwork-nest/node_modules/prisma-docs-generator/dist/generator/toc.js:84:47)
    at TOCGenerator.getData (/Users/akash/Documents/kaamwork/kaamwork-nest/node_modules/prisma-docs-generator/dist/generator/toc.js:94:25)
    at new TOCGenerator (/Users/akash/Documents/kaamwork/kaamwork-nest/node_modules/prisma-docs-generator/dist/generator/toc.js:5:26)
    at HTMLPrinter.toHTML (/Users/akash/Documents/kaamwork/kaamwork-nest/node_modules/prisma-docs-generator/dist/printer/index.js:47:24)
    at Object.onGenerate (/Users/akash/Documents/kaamwork/kaamwork-nest/node_modules/prisma-docs-generator/dist/index.js:49:101)
    at async LineStream.<anonymous> (/Users/akash/Documents/kaamwork/kaamwork-nest/node_modules/@prisma/generator-helper/dist/generatorHandler.js:13:32)
pantharshit00 commented 3 years ago

Hi, I haven't updated this package in a while so this is expected. I plan to fix this soon.

martin-aussenhof commented 3 years ago

Hi @pantharshit00,

I was wondering if you have a rough estimate on when you will add this update. I acknowledge that you mostly like have many other things to do, but I really like this package and would like to add it back into my projects.

Thanks, Martin

pantharshit00 commented 3 years ago

Hey @martin-aussenhof

I am having my exams for my university so didn't find much spare time. Hopefully by end of this month I will have some time for this.

martin-aussenhof commented 3 years ago

Thank you @pantharshit00. I hope your exams are going well!

pantharshit00 commented 3 years ago

Fixed in 0.2.0