인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

hyunzxn's profile image
hyunzxn

asked

Next + Create a SNS service with React Query

Setting up react-query SSR

next.js 15 로 진행 중인데 리액트 쿼리 설치 관련 질문입니다.

Written on

·

214

·

Edited

0

next.js 15 로 따라가면서 진행 중인데 리액트 쿼리를 설치하려고 하니 리액트19 가 아직 안정적이지 않아서 npm 설치할 때 충돌이 생긴다고 에러가 뜨는 것 같습니다.

npm ERR! code ERESOLVE

npm ERR! ERESOLVE unable to resolve dependency tree

npm ERR!

npm ERR! While resolving: z-com@0.1.0

npm ERR! Found: react@19.0.0-rc-66855b96-20241106

npm ERR! node_modules/react

npm ERR! react@"19.0.0-rc-66855b96-20241106" from the root project

npm ERR!

npm ERR! Could not resolve dependency:

npm ERR! peer react@"^18 || ^19" from @tanstack/react-query@5.62.7

npm ERR! node_modules/@tanstack/react-query

npm ERR! @tanstack/react-query@"*" from the root project

npm ERR!

npm ERR! Fix the upstream dependency conflict, or retry

npm ERR! this command with --force or --legacy-peer-deps

npm ERR! to accept an incorrect (and potentially broken) dependency resolution.



-------

리액트 19 안정화 버전으로 업데이트 진행했습니다!

그랬더니 next 와 리액트19 사이에 에러가 발생해서 next 도 latest 로 업데이트 해주고 리액트 쿼리를 설치하니까 되네요!

이 방법이 맞는지는 모르겠지만 일단 이렇게도 되긴 합니다!

reactnext.jsreact-querynext-authmsw

Answer 1

0

zerocho님의 프로필 이미지
zerocho
Instructor

네 이번에 next 15.1.0이 나오면서 react 버전도 19로 뒤에 더 붙은 것 없이 고정되었습니다.

hyunzxn's profile image
hyunzxn

asked

Ask a question