0

I have a GatsbyJS site that I am building. On that site, I am getting a warning about having 'multiple modules with names that only differ in casing'. The thing is, as far as I know I do NOT have multiple modules with names that only differ in casing.

Here is the full warning message:

./src/ui/Components/button.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:* 

C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\Components\button.js    

Used by 2 module(s), i. e.    
C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\Components\index.js* C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\components\button.js    

Used by 2 module(s), i. e.    
C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\components\index.js./src/ui/Components/dropdown.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:* 

C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\Components\dropdown.js    

Used by 2 module(s), i. e.    
C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\Components\index.js* C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\components\dropdown.js    

Used by 2 module(s), i. e.    
C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\components\index.js./src/ui/Components/index.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:* 

C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\Components\index.js    

Used by 18 module(s), i. e.    
C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\layouts\main\components\news-articles.js* C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\components\index.js    

Used by 5 module(s), i. e.    
C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\forms\contact.js./src/ui/Components/input.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:* 

C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\Components\input.js    

Used by 2 module(s), i. e.    
C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\Components\index.js* C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\components\input.js    

Used by 2 module(s), i. e.    
C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\components\index.js./src/ui/Components/list.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:* 

C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\Components\list.js    

Used by 2 module(s), i. e.    
C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\Components\index.js* C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\components\list.js    

Used by 2 module(s), i. e.    
C:\code\projects\Startup Reporter\styled-1\node_modules\gatsby\dist\utils\babel-loader.js??ref--4-0!C:\code\projects\Startup Reporter\styled-1\node_modules\eslint-loader\index.js??ref--11-0!C:\code\projects\Startup Reporter\styled-1\src\ui\components\index.js

Any idea why I am getting this message and what I can do to solve the problem?

Thanks.

Moshe
  • 6,011
  • 16
  • 60
  • 112
  • Check your import statements, you most likely have some casing mismatch. Should you be importing "Button" instead of "button" or vice versa? This is also covered in [this question](https://stackoverflow.com/questions/48631497/there-are-multiple-modules-with-names-that-only-differ-in-casing-react) and [this GitHub thread](https://github.com/PatrickJS/angular-starter/issues/926#issuecomment-246749591). – Robin Métral Feb 07 '20 at 07:46
  • I've checked multiple times -- can't find anything. – Moshe Feb 09 '20 at 13:51
  • Can we see the code for your `Button` component and the component you import it in? – Robin Métral Feb 09 '20 at 17:16

2 Answers2

2

This problem mainly occurs when you have used capital letter for import path but webpack comprehend small letter.

0

I found my capital letter in the service path in my xxx.module.ts