Skip to content
New issue

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

TypeError: mappings.filter is not a function #19

Closed
tyshgc opened this issue Nov 13, 2020 · 3 comments · Fixed by #21
Closed

TypeError: mappings.filter is not a function #19

tyshgc opened this issue Nov 13, 2020 · 3 comments · Fixed by #21

Comments

@tyshgc
Copy link

tyshgc commented Nov 13, 2020

Hi!
I use prisma-docs-generator 0.0.6 and Prisma 2.11.0, has this error.

npx prisma generate
Environment variables loaded from /Users/tyshgc/development/tyshgc/study_prisma/starter/prisma/.env
Prisma schema loaded from prisma/schema.prisma
Error: 
TypeError: mappings.filter is not a function
    at getMappings (/Users/tyshgc/development/tyshgc/study_prisma/starter/node_modules/prisma-docs-generator/dist/generator/transformDMMF.js:17:10)
    at Object.transformDMMF [as default] (/Users/tyshgc/development/tyshgc/study_prisma/starter/node_modules/prisma-docs-generator/dist/generator/transformDMMF.js:11:19)
    at Object.onGenerate (/Users/tyshgc/development/tyshgc/study_prisma/starter/node_modules/prisma-docs-generator/dist/index.js:38:45)
    at LineStream.<anonymous> (/Users/tyshgc/development/tyshgc/study_prisma/starter/node_modules/@prisma/generator-helper/dist/generatorHandler.js:13:46)
    at LineStream.emit (events.js:314:20)
    at addChunk (_stream_readable.js:303:12)
    at readableAddChunk (_stream_readable.js:279:9)
    at LineStream.Readable.push (_stream_readable.js:218:10)
    at LineStream.Transform.push (_stream_transform.js:166:32)
    at LineStream._pushBuffer (/Users/tyshgc/development/tyshgc/study_prisma/starter/node_modules/@prisma/generator-helper/dist/byline.js:108:23)

In getMappings() of transformDMMF.ts, The argument mappings is an object, not an array?

@pantharshit00
Copy link
Owner

pantharshit00 commented Nov 13, 2020

Looks like there was some breaking change in the dmmf format. I will fix this soon this weekend when I get some time

@pantharshit00
Copy link
Owner

Fixed via #21, doing a release now

@pantharshit00
Copy link
Owner

Upgrade to v0.1.0 https://www.npmjs.com/package/prisma-docs-generator/v/0.1.0 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants