kyucumber
전체 글 보기

npm build Couldn't follow symbolic link - mac os case-insensitive filesystem issue

로컬 환경(MacOS)에서 성공하는 npm build가 아래와 같은 에러를 노출하며 CI 서버(Linux)에서 빌드가 실패하는 문제가 발생했습니다. 별거 아닌 문제였지만 1시간 가량 삽질을 진행했는데 아래와 같은 문제를 다시 겪지 않도록 관련 내용을 정리합니다.

ERROR in ./app/containers/~~.tsx Module not found: Error: Can't resolve 'constants/~~~' in

원인

Mac의 경우 case-insensitive filesystem로 설계되어 있으며 대 소문자를 구분하지 않습니다.

리팩토링 과정에서 대 소문자를 변경했는데 일부 변경되지 않은 부분이 남아있었고 이 때문에 CI 서버(Linux)에서 빌드할 때 오류가 발생했습니다.

https://stackoverflow.com/questions/13617863/can-i-force-node-js-require-to-be-case-sensitive

해결

위와 같은 경우라면 import 구문 등에서 대 소문자가 제대로 입력되지 않은 부분을 찾아서 수정해야 합니다.

Table of contents