我收到一条关于“多个模块的名称仅大小写不同”的警告。
我尝试过:更改react的导入声明,删除节点模块并使用npm i重新安装。
这就是我在组件中导入 React 的方式: import React from 'react'
这是警告消息:
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
* /Users/Downloads/website/node_modules/gatsby/dist/utils/babel-loader.js??ref--4-0!/Users/Downloads/website/node_modules/eslint-loader/index.js??ref--11-0!/Users/Downloads/website/src/components/DiscoverBannerIndex.js
Used by 6 module(s), i. e.
/Users/Downloads/website/node_modules/gatsby/dist/utils/babel-loader.js??ref--4-0!/Users/Downloads/website/node_modules/eslint-loader/index.js??ref--11-0!/Users/Downloads/website/src/pages/download/windows.js
* /Users/Downloads/website/node_modules/gatsby/dist/utils/babel-loader.js??ref--4-0!/Users/Downloads/website```
Run Code Online (Sandbox Code Playgroud)
cor*_*ard 15
通常,此错误意味着您已经执行了以下操作:
// in one file:
import Foo from "src/components/Foo"
// in another file:
import Foo from "src/components/foo"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6585 次 |
| 最近记录: |