nextauth error가 발생할 수 있는데,
나 같은 경우엔 next.js version과
next-auth version이 안맞아서 난 에러였다.
next version을 v12를 쓰고 있었는데
이 v12와 맞는 버젼에 next-auth를 써야 빌드된다.
"next": "12.1.6",
아래 글처럼 "next-auth": "4.15.1" 로 고정한후
node_modules를 지우고 다시 빌드하니 문제없이 동작했다!
https://stackoverflow.com/questions/74339649/next-js-error-cannot-find-module-next-headers
Next.js error cannot find module 'next/headers'
Faced this issue when I was using login functionality developed by my teammate in a group project and apparently I am the only one facing this issue. npm version: 8.19.3 node version: 16.17.0 package.
stackoverflow.com
'개발로 부자되기 > next.js' 카테고리의 다른 글
next js router 페이지간 query 전달하기 2가지 방법, 예시 (0) | 2023.12.10 |
---|---|
next js 13 route.js get route params 요청 받기 api/[test] (0) | 2023.10.09 |
next 13 auth firebase google login 해결법 (vercel 배포까지) (0) | 2023.09.29 |
react-table 너비 (width) 조정하기, 예제코드 (0) | 2023.08.31 |
next.js에서 버튼 누를 시, url 이동하기 리디랙션(redirect) (0) | 2023.07.17 |