code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: my-blog@0.1.0
npm ERR! Found: next@14.1.0
npm ERR! node_modules/next
npm ERR! next@"14.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer next@"^12 || ^13" from next-contentlayer@0.3.4
npm ERR! node_modules/next-contentlayer
npm ERR! next-contentlayer@"*" 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.
Next.js에 Contentlayer 설치 중 뜬 오류.
가장 깔끔한 해결책은 여기에서 확인 할 수 있다.
// package.json
"overrides": {
"next-contentlayer": {
"next": "$next"
}
}
package.json에 저 코드들을 추가해주면 된다.
'Recap > 에러 해결 기록' 카테고리의 다른 글
| vercel로 배포 후 새로고침 시 404 이슈와 클라이언트 사이드 라우팅 (1) | 2024.03.01 |
|---|---|
| vercel로 배포 후 proxy 설정하여 CORS 에러 해결하기 (1) | 2024.03.01 |
| [React] vite에서 CORS 에러 해결하기 (2) | 2024.01.25 |
| [JavaScript] 바닐라 자바스크립트로 SPA 만들 때 라우팅이 제대로 되지 않는 문제 (2) | 2024.01.10 |
| [JavaScript] map() 했을 때 콤마가 함께 렌더링 된다면 (0) | 2024.01.10 |