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
import {
Module,
MiddlewaresConsumer,
NestModule,
RequestMethod,
} from '@nestjs/common';
import { graphqlExpress } from 'apollo-server-express';
import { GraphQLModule, GraphQLFactory } from '@nestjs/graphql';
import {UsersModule} from './Users/users.module';
@Module({
imports: [GraphQLModule],
modules: [UsersModule],
export class ApplicationModule {
constructor(private readonly graphQLFactory: GraphQLFactory) {}
}
And application exits with following error:
[Nest] 24011 - 2018-2-13 13:06:05 [NestFactory] Starting Nest application...
[Nest] 24011 - 2018-2-13 13:06:05 [ExceptionHandler] Nest can't resolve dependencies of the ApplicationModule (?). Please verify whether [0] argument is available in the current context.
Error: Nest can't resolve dependencies of the ApplicationModule (?). Please verify whether [0] argument is available in the current context.
at Injector.<anonymous> (/home/tymur/Learning/nest/project/node_modules/@nestjs/core/injector/injector.js:160:23)
at Generator.next (<anonymous>)
at fulfilled (/home/tymur/Learning/nest/project/node_modules/@nestjs/core/injector/injector.js:4:58)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:160:7)
at Function.Module.runMain (module.js:703:11)
at startup (bootstrap_node.js:190:16)
at bootstrap_node.js:662:3
1: node::Abort() [node]
2: 0x8c8099 [node]
3: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [node]
4: 0xaddc5c [node]
5: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [node]
6: 0x3ab9ebd042fd
Aborted (core dumped)
UsersModule is dummy module:
import {Module} from '@nestjs/common';
import {UsersService} from './users.service';
import UsersController from './users.controller';
import {usersProviders} from './users.providers';
import {DatabaseModule} from '../common/database/database.module';
import {LibrariesModule} from '../Libraries/libraries.module';
import {UserResolver} from './user.resolver';
@Module({
// modules: [DatabaseModule, LibrariesModule],
// controllers: [UsersController],
// components: [
// UsersService,
// ...usersProviders,
// UsersResolver,
// ],
// exports: [
// UsersService,
// ],
})
export class UsersModule {}
but if i comment out modules: [UsersModule], in ApplicationModule, everithing works fine. Same as commenting out constructor in application module. What im doing wrong?
The text was updated successfully, but these errors were encountered:
I have following code:
And application exits with following error:
UsersModule is dummy module:
but if i comment out
modules: [UsersModule],
in ApplicationModule, everithing works fine. Same as commenting out constructor in application module. What im doing wrong?The text was updated successfully, but these errors were encountered: