You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Не разрешаются зависимости RequestVerifierGuard пакета nestjs-tinkoff
Ожидаемое поведение
Зависимости разрешаются
Материалы
Nest could not find TinkoffService element (this provider does not exist in the current context)
15 |
16 | onModuleInit() {
> 17 | this.ref.get(TinkoffService)
| ^
18 | }
19 | }
20 |
at InstanceLinksHost.get (../../node_modules/@nestjs/testing/node_modules/@nestjs/core/injector/instance-links-host.js:24:19)
at Object.find (../../node_modules/@nestjs/testing/node_modules/@nestjs/core/injector/module-ref.js:38:55)
at Object.get (../../node_modules/@nestjs/testing/node_modules/@nestjs/core/injector/module.js:339:28)
at RequestVerifierGuard.onModuleInit (src/guards/request-verifier.guard.ts:17:14)
at MapIterator.iteratee (../../node_modules/@nestjs/testing/node_modules/@nestjs/core/hooks/on-module-init.hook.js:22:43)
at MapIterator.next (../../node_modules/iterare/src/map.ts:9:39)
at IteratorWithOperators.next (../../node_modules/iterare/src/iterate.ts:19:28)
at Function.from (<anonymous>)
at IteratorWithOperators.toArray (../../node_modules/iterare/src/iterate.ts:227:22)
at callOperator (../../node_modules/@nestjs/testing/node_modules/@nestjs/core/hooks/on-module-init.hook.js:23:10)
Описание бага
Не разрешаются зависимости RequestVerifierGuard пакета nestjs-tinkoff
Ожидаемое поведение
Зависимости разрешаются
Материалы
Что делать?
Нужно дать guard'е контекст нашего модуля
Похожая проблема решалась тут https://github.com/nestjs/passport/blob/master/lib/auth.guard.ts#L26
The text was updated successfully, but these errors were encountered: