1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

<next build>module not found @/components/input

1
Last updated at Posted at 2023-10-29

localでの build は通るのに github actions での build が通らないエラーに遭遇したので忘備録

エラーメッセージ

Creating an optimized production build...
▲  Failed to compile.
▲  ./app/maps/page.tsx:4:0
▲  Module not found: Can't resolve '@/components/input'

aliasの登録はしている。

tsconfig.json
...
"baseUrl": ".",
"pahts": {
  "@/components/*": ["./components/*"],
  ...
}

./components/input/index.tsxも存在している。

原因

Github 上で ./components/Input/index.tsx と input がパスカルケースで登録されていた。

そういえば間違って最初に大文字でディレクトリを作った気がする。。
Github上で大文字小文字の認識がされておらず、CI 上では未追跡の@/components/inputを参照しようとしていたのが問題になっている。

これで認識される
git config core.ignorecase false

参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?