BaGyun
빠균's 개발노트
BaGyun
전체 방문자
오늘
어제
  • 분류 전체보기 (71)
    • Today I Learned (44)
      • 오류 (8)
      • JavaScript (15)
      • TypeScript (9)
      • NodeJS (0)
      • NestJS (0)
      • Database (3)
      • ORM (1)
      • 알고리즘 (2)
      • 개인공부 (4)
      • Deploy (0)
      • Git (1)
    • 개인프로젝트 (4)
    • 알고리즘 (14)
      • 프로그래머스 (14)
    • 면접질문 (5)
    • 회고 (3)

인기 글

반응형

블로그 메뉴

  • 홈
  • 태그
  • 방명록
hELLO · Designed By 정상우.
BaGyun

빠균's 개발노트

Today I Learned/오류

[Error] Missing "driver" option. In the latest version of "@nestjs/graphql" package (v10) a new required configuration property called "driver" has been introduced. Check out the official documentation for more details on how to migrate

2022. 10. 19. 13:08

어떤 에러인가요?

이전에는 버전 간에 호환문제가 있어 다운그레이드해서 15버전을 설치했다고 한다.

하지만 최근엔 최신 버전의 "@nestjs/graphql" 패키지(v10)에는 "driver"라는 새로운 필수 구성 속성이 도입되었습니다. 마이그레이션 방법에 대한 자세한 내용은 공식 문서를 참조하십시오.라는 오류메시지로 안내해준다.

에러 메세지

Error: Missing "driver" option. In the latest version of "@nestjs/graphql" package (v10) a new required configuration property called "driver" has been introduced. Check out the official documentation for more details on how to migrate

에러 핸들링 방법

 

Documentation | NestJS - A progressive Node.js framework

Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Progamming), FP (Functional Programming), and FRP (Functional Reac

docs.nestjs.com

위 주소로 들어가게되면, 가이드가 나오는데 가이드 따라 @nestjs/apollo를 설치 및 forRoot에 추가해주면 된다.

// Before
import { Module } from '@nestjs/common';
import { GraphQLModule } from '@nestjs/graphql';

@Module({
  imports: [
    GraphQLModule.forRoot(),
  ],
})
export class AppModule {}

// After
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
import { Module } from '@nestjs/common';
import { GraphQLModule } from '@nestjs/graphql';

@Module({
  imports: [
    GraphQLModule.forRoot<ApolloDriverConfig>({
      driver: ApolloDriver,
    }),
  ],
})
export class AppModule {}

'Today I Learned > 오류' 카테고리의 다른 글

[Error] Apollo Server requires either an existing schema, modules or typeDefs  (0) 2022.10.19
[Error] Cannot use import statement outside a module  (0) 2022.08.05
[Error] 서버 실행 시 발생하는 에러  (0) 2022.07.08
[Error] sequelize-auto를 사용했을 때, initModels파일로 테이블들을 Join할 때 마주하는 오류  (0) 2022.07.08
[Error] sequelize-auto를 사용 했을 때, associate 지정을 따로 해주지않고 사용하는 법  (0) 2022.07.08
    'Today I Learned/오류' 카테고리의 다른 글
    • [Error] Apollo Server requires either an existing schema, modules or typeDefs
    • [Error] Cannot use import statement outside a module
    • [Error] 서버 실행 시 발생하는 에러
    • [Error] sequelize-auto를 사용했을 때, initModels파일로 테이블들을 Join할 때 마주하는 오류
    BaGyun
    BaGyun

    티스토리툴바