. Advertisement .
..3..
. Advertisement .
..4..
I’m using webpack 3.8.1 and today I get the ”there are multiple modules with names that only differ in casing.” error when run my program.
The error message is as below:
WARNING in ./src/Components/NavBar/MainMenuItemMobile.js
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:
* /Users/path/to/babel-loader/lib/index.js!/Users/path/to/NavBar/MainMenuItemMobile.js
Used by 1 module(s), i. e.
/Users/path/to/babel-loader/lib/index.js!/Users/path/to/NavBar/ConstructedMainMenuItems.js
* /Users/path/to/babel-loader/lib/index.js!/Users/path/to/Navbar/MainMenuItemMobile.js
Used by 1 module(s), i. e.
/Users/path/to/babel-loader/lib/index.js!/Users/path/to/Navbar/ConstructedMainMenuItems.js
.....
(webpack)-hot-middleware/client.js ./src/index.js
I don’t know why this issue appears and how to fix. Can you help me?
The cause: This frequently happens as a result of a minuscule typo.
Solution: Make sure the capitalization of the path you used in your terminal is correct.
For instance, if your project has the following path and you’re running git bash on Windows:
If you using
cd /c/myprojects/project-x
(note the lack of capital cases) to access it and then runnpm start
, you might get this problem.The solution would be to consider the project path case-sensitive and use it as the below: