반응형
Netlify 배포를 하다가 컴파일 에러가 발생했다.
1. 에러메시지
에러메시지는 아래와 같다.
Failed to compile. Module not found: Error: Can't resolve 'react-icons/fi' in '/opt/build/repo/src
➡️ 'react-icons/fi'를 찾지 못한다
2. 에러 원인
구글링결과 react-icon이
package.json에 존재하기 않아서라는 것을 알게 되었다.
실제로 들어가보니 package.json의 dependencies에 react-icons가 없었다.
3. 해결방법
터미널에서 yarn add react-icons 해준다 (react-icons 다시 설치해줌)
package.json에 react-icons가 추가된 것이 보인다.
4. 결과
👍 해결완료!! 👍
참고자료
Can't resolve 'react-icons/hi' in '/opt/build/repo/gatsby/src/components'
UPDATE: Removed react-icons and moved to Font-Awesome for React. SOLVED I’m trying to build at patrickfranzport.netlify.app and it keeps failing. My repo consists of two directories, one for gatsby and one for sanity. I’m only having it build the gatsb
answers.netlify.com
반응형