inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스

15-01-pagination

yarn generate오류

해결된 질문

361

김무연

작성한 질문수 12

0

$ yarn generate

yarn run v1.22.19

$ graphql-codegen

✔ Parse Configuration

⚠ Generate outputs

❯ Generate to ./src/commons/types/generated/typed.ts

✔ Load GraphQL schemas

✔ Load GraphQL documents

✖ Cannot use GraphQLObjectType "BoardReturn" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules

directory. If d…

error Command failed with exit code 1.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

 

 

 

practice로 주소를 변경하고 yarn generate를 실행하는데 자꾸 위와같은 오류가 납니다 ㅠㅠ

react node.js seo graphql next.js

답변 1

0

노원두

안녕하세요! 무연님!

무연님께서 설치하신 node_modules의 라이브러리에서 중복으로 graphql을 설치하는 라이브러리가 존재하는 것 같아요!

아래의 에러 메시지를 보시게 되면, graphql은 오직 1개여야 한다고 합니다!

Ensure that there is only one instance of "graphql" in the node_modules

directory.

여기서 말하는 오직 1개는 동일한 버전의 graphql을 말하는데요!
예를들면, 내가 설치한 graphql이 15버전이고, 내가 설치한 qqq라는 라이브러리에서 설치하는 graphql이 14버전인 경우 아래와 같습니다!
/node_modules/graphql => 15버전
/node_modules/qqq/node_modules/graphql => 14버전


이러한 경우, 두 graphql 버전을 일치시켜주셔야 하는데요!
이 때, package.json에서 resolutions라는 설정으로 일치시킬 수 있답니다!

// package.json

{
  "dependencies": {
    ...
  },
  "devDependencies": {
    ...
  },
  "resolutions": {
    "graphql": "공통으로 설치를 원하는 버전"
  }
}

fetchBoardsOfMine, fetchBoardsCountOfMine 에러 문의드립니다

0

36

1

댓글 기능 구현 중 질문드립니다.

0

66

1

쿠폰코드 발급

0

132

2

example 서버 플레이그라운드, API 접속 모두 안됩니다.

0

86

2

문의드립니다!! ㅠㅠ

0

101

2

graphql 백엔드 서버가 포폴용 빼곤 접속이 안됩니다.

0

76

2

_app.js 작성 이후로 에러가 발생하네요

0

93

2

학습자료

0

70

2

학습자료가 안열립니다.

0

49

2

플레이 그라운드 퀴즈 문제 질문이 있습니다.

0

59

0

기존강의 구매자, 업데이트 끝인가요?

0

109

3

업데이트 버전 수강

0

88

2

완벽한 프론트엔드

0

136

2

나만의 쇼핑몰 샘플 페이지 접속 확인부탁드립니다.

0

83

1

graphql 접속이 안됩니다.

0

100

2

const, let 사용 질문 드립니다.

0

70

2

싸이월드 만들기 1탄 피드백 부탁드립니다.

0

122

2

회원가입 과제 피드백 부탁드립니다.

0

80

2

styled.span / styled.input "CSS 자동완성"

0

47

1

쿠폰 발급 관련

0

166

2

서버 502 error

0

247

2

쿠폰 다시 부탁드려도 될가여?

0

140

2

a태그 패딩했을때 왜 크기가 줄어들지 않고 늘어나나요

0

184

2

2분 44초 질문

0

131

3