nestjs / mongoose

Mongoose module for Nest framework (node.js) 🍸
https://nestjs.com
MIT License
521 stars 117 forks source link

Cannot convert undefined to a BigInt #2209

Closed llegoelkelo closed 2 months ago

llegoelkelo commented 2 months ago

Is there an existing issue for this?

Current behavior

When you add a bigint field to a schema you get an error: Cannot convert undefined to a BigInt

@Prop()
myBigInt?: bigint

Error:

TypeError: Cannot convert undefined to a BigInt at BigInt () at Function.inspectTypeDefinition

Minimum reproduction code

N/A

Steps to reproduce

No response

Expected behavior

Schema should work correctly with BigInt which is fully supported by mongoose.

Package version

10.0.2

mongoose version

No response

NestJS version

No response

Node.js version

No response

In which operating systems have you tested?

Other

No response

kamilmysliwiec commented 2 months ago

Please provide a minimum reproduction repository (Git repository/StackBlitz/CodeSandbox project).

llegoelkelo commented 2 months ago

I created this repo https://codesandbox.io/p/devbox/elastic-shadow-zqc78l but only to find out that the problem has already been fixed in the latest version of the package.