-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Nest can't resolve dependencies of the AlgoliaService (?). Please make sure that the argument at index [0] is available in the context. #1
Comments
Hi Paul, I've prepared an update to the library to support nestjs 6. As I don't have the time to migrate one of my application yet, can I ask you to test if the changes I've made are working for you? Here's how you can proceed:
If everything works great, I'll publish the package on npm and you will be able to use it from there.
|
Hi, Thank you very much for the fix and sorry for the delay. We are getting this error: Nest can't resolve dependencies of the AlgoliaService (?). Please make sure that the argument ALGOLIA_MODULE_OPTIONS at index [0] is available in the SearchIndexModule context.
Potential solutions:
- If ALGOLIA_MODULE_OPTIONS is a provider, is it part of the current SearchIndexModule?
- If ALGOLIA_MODULE_OPTIONS is exported from a separate @Module, is that module imported within SearchIndexModule?
@Module({
imports: [ /* the Module containing ALGOLIA_MODULE_OPTIONS */ ]
})
Error: Nest can't resolve dependencies of the AlgoliaService (?). Please make sure that the argument ALGOLIA_MODULE_OPTIONS at index [0] is available in the SearchIndexModule context.
Potential solutions:
- If ALGOLIA_MODULE_OPTIONS is a provider, is it part of the current SearchIndexModule?
- If ALGOLIA_MODULE_OPTIONS is exported from a separate @Module, is that module imported within SearchIndexModule?
@Module({
imports: [ /* the Module containing ALGOLIA_MODULE_OPTIONS */ ]
})
at Injector.lookupComponentInExports (/Users/paulsalmon/workspace/plato/plato-monorepo-research/node_modules/@nestjs/core/injector/injector.js:183:19)
at processTicksAndRejections (internal/process/task_queues.js:86:5)
at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:56:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:880:11)
at Object.<anonymous> (/Users/paulsalmon/workspace/plato/plato-monorepo-research/node_modules/ts-node/src/bin.ts:158:12)
at Module._compile (internal/modules/cjs/loader.js:816:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
at Function.Module._load (internal/modules/cjs/loader.js:620:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:877:12)
error Command failed with exit code 1. The fix for this is to export the @Module({
providers: [AlgoliaService],
exports: [ALGOLIA_MODULE_OPTIONS, AlgoliaService],
}) Are you happy with this change? If so I can cook a PR on your v2 version. Thanks again! |
Hi, sorry for the late response. I added the ALGOLIA_MODULE_OPTIONS to the export array. Could you give a try again? Thanks in advance! |
Error message
Versions:
@nestjs/common - 6.7.1
@nestjs/core - 6.7.1
nestjs-algolia - 1.1.0
Hello! Thank you for the project. So I am having this error that I would guess is related to the last update of Nest. Any idea?
The text was updated successfully, but these errors were encountered: