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

Issue using Mongoose 5.12 #28

Open
capewaterAP opened this issue May 20, 2021 · 1 comment
Open

Issue using Mongoose 5.12 #28

capewaterAP opened this issue May 20, 2021 · 1 comment

Comments

@capewaterAP
Copy link

Hi,

I tried to bump mongoose to 5.12 but I'm a newbie and I can't do it right.

I continue to have compiling errors like this :

Type 'LeanDocument' is missing the following properties from type 'Blog': $getAllSubdocs, $ignore, $isDefault, $isDeleted, and 48 more.ts(2740)
Type 'Promise' is not assignable to type 'Promise<Blog[]>'.
Type 'Blog' is missing the following properties from type 'Blog[]': length, pop, push, concat, and 28 more.ts(2322)

Could someone eventually check and propose a fix?

Regards

@luckyycool
Copy link

luckyycool commented Jan 9, 2022

Hi,

I tried to bump mongoose to 5.12 but I'm a newbie and I can't do it right.

I continue to have compiling errors like this :

Type 'LeanDocument' is missing the following properties from type 'Blog': $getAllSubdocs, $ignore, $isDefault, $isDeleted, and 48 more.ts(2740) Type 'Promise' is not assignable to type 'Promise<Blog[]>'. Type 'Blog' is missing the following properties from type 'Blog[]': length, pop, push, concat, and 28 more.ts(2322)

Could someone eventually check and propose a fix?

Regards

change .lean<Blog>() to .lean<Blog[]>() whereever you are getting that error.

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

No branches or pull requests

2 participants