0
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 3 years have passed since last update.

”npm run dev”のエラー 「There are multiple modules with names that only differ in casing.」 解決法

Posted at

環境

  • Windows10
  • GitBash
  • Vscode

状況

Next.jsを学習がてら触ろうと思い、デスクトップにデモアプリを作成しnpm run devしたところ、以下のようなエラーが出てしまい、解決しましたので記しておこうと思います。

 $ npm run dev
  ~略~
 There are multiple modules with names that only differ in casing.
 This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
 Use equal casing. Compare these module identifiers:
 ~略~  

解決策

エラー文の通り、小文字と大文字の識別に関するエラーのようなので検索したところ、こちらの記事から解決することができました。

簡単に記すと、原因としては、プロジェクトの作成場所に移動する際に小文字で移動することで起きてしまったエラーのようです。そのため、プロジェクトの作成場所に移動する際に
cd desktop → cd Desktop
とすることで解決することができました。

エラー文を読むことで解決できるので、エラー文を読むのも大切だと感じました。

それにしても、小文字と大文字の識別やタイプエラーが多くて大変です・・・

0
0
1

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
0
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?