currenjin / site-for-developers

🌏🇰🇷 개발자를 위한 북마크 모음집
791 stars 75 forks source link

Vercel 빌드 중 에러. #48

Closed rivercory closed 6 months ago

rivercory commented 6 months ago

https://github.com/currenjin/site-for-developers/pull/35 이 PR에서 사이트맵을 추가했었습니다. 그 과정에서 react-router-sitemap이라는 의존성을 설치했는데요, 해당 PR 이후로 Vercel에서 해당 오류와 함께 빌드가 되지 않습니다.

[23:25:14.470] Running build in Washington, D.C., USA (East) – iad1 [23:25:14.629] Cloning github.com/rivercory/site-for-developers (Branch: website, Commit: 55176ed) [23:25:14.882] Cloning completed: 256.914ms [23:25:20.761] Restored build cache [23:25:20.851] Running "vercel build" [23:25:21.346] Vercel CLI 33.5.4 [23:25:22.903] Installing dependencies... [23:25:30.688] npm notice [23:25:30.688] npm notice New minor version of npm available! 10.2.4 -> 10.5.0 [23:25:30.688] npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.5.0 [23:25:30.688] npm notice Run npm install -g npm@10.5.0 to update! [23:25:30.689] npm notice [23:25:30.690] npm ERR! code ERESOLVE [23:25:30.692] npm ERR! ERESOLVE could not resolve [23:25:30.693] npm ERR! [23:25:30.693] npm ERR! While resolving: react-router-sitemap@1.2.0 [23:25:30.693] npm ERR! Found: react@18.2.0 [23:25:30.693] npm ERR! node_modules/react [23:25:30.693] npm ERR! react@"^18.2.0" from the root project [23:25:30.693] npm ERR! peer react@"^18" from flowbite-react@0.7.2 [23:25:30.694] npm ERR! node_modules/flowbite-react [23:25:30.694] npm ERR! flowbite-react@"^0.7.2" from the root project [23:25:30.694] npm ERR! 13 more (react-icons, next-contentlayer, react-dom, react-icons, ...) [23:25:30.694] npm ERR! [23:25:30.694] npm ERR! Could not resolve dependency: [23:25:30.694] npm ERR! peer react@"^15.1.0 || ^16.0.0" from react-router-sitemap@1.2.0 [23:25:30.694] npm ERR! node_modules/react-router-sitemap [23:25:30.694] npm ERR! react-router-sitemap@"^1.2.0" from the root project [23:25:30.695] npm ERR! [23:25:30.695] npm ERR! Conflicting peer dependency: react@16.14.0 [23:25:30.695] npm ERR! node_modules/react [23:25:30.695] npm ERR! peer react@"^15.1.0 || ^16.0.0" from react-router-sitemap@1.2.0 [23:25:30.695] npm ERR! node_modules/react-router-sitemap [23:25:30.695] npm ERR! react-router-sitemap@"^1.2.0" from the root project [23:25:30.696] npm ERR! [23:25:30.696] npm ERR! Fix the upstream dependency conflict, or retry [23:25:30.696] npm ERR! this command with --force or --legacy-peer-deps [23:25:30.696] npm ERR! to accept an incorrect (and potentially broken) dependency resolution. [23:25:30.696] npm ERR! [23:25:30.696] npm ERR! [23:25:30.696] npm ERR! For a full report see: [23:25:30.696] npm ERR! /vercel/.npm/_logs/2024-03-09T14_25_23_515Z-eresolve-report.txt [23:25:30.697] [23:25:30.698] npm ERR! A complete log of this run can be found in: /vercel/.npm/_logs/2024-03-09T14_25_23_515Z-debug-0.log [23:25:30.717] Error: Command "npm install" exited with 1 [23:25:31.165]

rivercory commented 6 months ago

해결했습니다!

currenjin commented 6 months ago

와!

currenjin commented 6 months ago

어떤게 문제였나요!

rivercory commented 6 months ago

React 라이브러리 버전을 react-router-sitemap에서 지원하지 않아서 생긴 오류였습니다. install 명령어에 --force를 넣어 해결했습니다!