我有一个我正在构建的GatsbyJS站点。在那个网站上,我收到了一个关于“多个模块的名称只是大小写不同”的警告。问题是,据我所知,我没有多个模块的名称只是大小写不同。
以下是完整的警告消息:
./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你知道为什么我会收到这条消息吗?我能做些什么来解决这个问题?
谢谢。
发布于 2021-08-29 10:04:03
这个问题主要发生在您已经使用大写的 letter作为导入路径,但是webpack理解small letter的时候。
发布于 2021-10-05 14:31:08
我在xxx.module.ts的服务路径中找到了我的大写字母
https://stackoverflow.com/questions/60101050
复制相似问题