[netlify] Failed to compile 오류

Mj Han·2020년 7월 11일
0
post-thumbnail

배포 Failed

etlify로 React로 작업한 사이트를 배포하려 하였다.
처음 배포하는 것도 아니고 데이터 최신화하기 위해 진행하였는데 Deploy failed 이라며 오류가 발생하였다.

1:48:13 AM: If the build failed with a warning about "process.env.CI = true", this is due to "create-react-app" treating warnings as errors when in CI. In order to fix this problem, please either:

js 내에 파일 주소를 process.env.PUBLIC_URL 사용한 것이 문제였다.

최근 netlify의 오류여서 꽤나 당황스러웠는데 참고 자료도 올라와 있어 다행이었다.

해결

CI=false npm run build

일부 라이브러리에 이전에 경고였던 내용을 빌드를 중단시키는 하드 오류로 받아들여 나오는 오류란다.. 그래서 build 설정을 바꿔주면 정상 배포되었다.

참고) netlify의 자세한 코멘트::
https://community.netlify.com/t/new-ci-true-build-configuration-treating-warnings-as-errors-because-process-env-ci-true/14434

profile
문화생활하는 마크업개발자

0개의 댓글