我正在寻找一种方法来测试我的雀巢PlayerController与Jest。我的控制器和服务声明:
import { QueryBus, CommandBus, EventBus } from '@nestjs/cqrs';
/**
* The service assigned to query the database by means of commands
*/
@Injectable()
export class PlayerService {
/**
* Ctor
* @param queryBus
*/
const
我对NestJS有一个问题,它似乎只适用于一个模块,所有其他模块都可以正常工作。我有以下模块。
错误是:
[ExceptionHandler] Nest can't resolve dependencies of the ApplicationService (ApplicationModel, AwsService, UserService, ?, JobService). Please make sure that the argument at index [3] is available in the ApplicationModule context.
AgencyServi
我犯了这样的错误:
Error: Nest can't resolve dependencies of the CreateGroupTask (TaskQueueService, GroupsService, ?, GroupNotificationsService, GroupRepository, Logger). Please make sure that the argument dependency at index [2] is available in the TasksModule context.
CreateGroupTasks服务看起来是这样的:
import
正当我认为我确实理解了模块是如何工作的,并且开始与守卫一起玩游戏时,我完全理解了这个错误。
Error: Nest can't resolve dependencies of the CanModifyGuard (UsersService, ?). Please make sure that the argument TelevisionsService at index [1] is available in the UsersModule context.
Potential solutions:
- If TelevisionsService is a provider, i
我是TypeScript新手,我只是尝试包括一个从节点模块导入的模块。我没有使用webpack或任何其他构建工具,因为我试图保持这尽可能基本的理解。
这是我的结构:
/node_modules -- contains node modules I want to import in main.ts
/scripts/ts/main.ts
/scripts/main.js -- the transpiled main.ts file
/index.html -- includes the module script tag for scripts/main.js
/package
我正试图通过跟踪这个Redis caching和这个来为nestjs-graphql项目设置。我正在遵循所提到的确切步骤,但我得到了一个错误,即Property 'get' does not exist on type 'Cache'.
这是确切的代码
import {User} from './user.entity'
import {Resolver, Query, ResolveField, Args, Parent, Mutation} from '@nestjs/graphql'
import { UsersServic
我有一个服务,我可以插入到其他组件,没有任何问题。
当我试图将该服务注入到另一个服务中时,我将得到
Error: Nest can't resolve dependencies of the AService (?).
Please make sure that the argument BService at index [0] is available in the AService context.
我找不到任何办法把服务注入彼此。这不是支持的,一种反模式.?
如果是这样的话,如何处理具有我想要在我的所有应用程序中在几个组件和服务中可用的功能的服务?
守则如下:
b.modul
在将nestjs-i18n升级到v8之后,我在做nestjs-i18n时遇到了问题。
这是我要犯的错误
Nest can't resolve dependencies of the I18nLanguageInterceptor (I18nOptions, I18nResolvers, I18nService, ?). Please make sure that the argument ModuleRef at index [3] is available in the I18nModule context.
Potential solutions:
If ModuleRef i