# 問題
GitHub Actionsで以下のエラーが発生。
Error: src/App.tsx(13,20): error TS2307: Cannot find module './MyPage' or its corresponding type declarations.
Error: src/__tests__/MyPage.test.tsx(3,20): error TS2307: Cannot find module '../MyPage' or its corresponding type declarations.
Error: Process completed with exit code 2.
原因
ローカルでは MyPage.tsx(Pが大文字)にリネームしたのに、
リモート(GitHub)では Mypage.tsx(pが小文字)のまま残っていた。
解決策
一度別名にリネームしてから、正しい名前にリネームする。
git mv src/Mypage.tsx src/Mypage_temp.tsx
git mv src/Mypage_temp.tsx src/MyPage.tsx
git add src/MyPage.tsx
git commit -m "fix: rename Mypage.tsx to MyPage.tsx (case only)"
git push
終わりに
ファイル名の大文字・小文字変更は、意外と見落としがちな落とし穴でした。
参考になれば幸いです。