Closed Gradlon closed 7 months ago
@Gradlon I'm unable to reproduce this with
"meilisearch": "^0.37.0",
"nestjs-meilisearch": "^2.1.5",
"@nestjs/common": "^10.0.0",
"@nestjs/core": "^10.0.0",
nodejs 20.10.0
Can you share a example which reproduces this?
Can confirm the issue.
nodejs v20.11.0
"meilisearch": "^0.37.0",
"nestjs-meilisearch": "^2.1.5",
"@nestjs/common": "^10.2.7",
"@nestjs/core": "^10.2.7",
"typescript": "^5.2.2",
@Gradlon's suggested fix works just fine
type of InjectMeilisearch
is inferred from Inject
, which is provided by @nestjs/common
import { Inject } from '@nestjs/common';
import { MEILI_CLIENT } from '../constants';
export function InjectMeiliSearch() {
return Inject(MEILI_CLIENT);
}
Here is a demo project running the meilisearch module, can you please help me reproduce here? https://stackblitz.com/edit/nestjs-typescript-starter-uvzcw9?file=src%2Fapp.service.ts
I also face the same issue but can't seem to reproduce
I have same issue: Node: 20.2.0 "@nestjs/common": "^10.3.3" "@nestjs/core":"10.3.3" "meilisearch": "^0.38.0" "nestjs-meilisearch": 2.1.5
typescript version? @vince8x
I used your demo project (https://stackblitz.com/edit/nestjs-typescript-starter-uvzcw9?file=src%2Fapp.service.ts).
When I add "strict": true
to the tsconfig.json file, the above error appears @lambrohan
it was issue with the older nestjs packages. Since InjectMeilisearch
was only inferring types as per Inject
from nestjs-common
package. Fixed this issue in new release https://github.com/lambrohan/nestjs-meilisearch/releases/tag/v2.1.6
When using the Inject Decorator I get the Following error:
The Code look like this.
An easy fix would be to change
to
Would this be viable?