javascript - 警告 : There is another module with an equal name when case is ignored

标签 javascript css webpack

当我运行我的元素时出现这个错误

WARNING in ./src/components/Header/index.scss
There is another module with an equal name when case is ignored.

但是我没有名为 Header 的模块。我有一个名为 header(小写)的模块,但我不确定为什么它仍然认为 Header 模块存在?我尝试删除我的 bundle 无济于事。 我还能做些什么来尝试对这个不存在的模块的所有引用?

最佳答案

你在使用 React.js 吗?我遇到了同样的问题,解决方案是更改

var React = require('React');

进入

var React = require('react');

我不确定这是如何解释错误消息的,如果你四处搜索,你会看到人们在 Window 上出于其他原因收到此错误消息。关于 Node.js 如何处理文件路径的一些事情

关于javascript - 警告 : There is another module with an equal name when case is ignored,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44998840/

相关文章:

javascript - 以下函数中加号 (+) 的作用是什么,该函数摘自 jquery 源代码

html - CSS : Scroll two div side by side independently

jquery - 如何仅在某些元素上转换框阴影

javascript - webpack 4 给出背景 : url([object Module]) as bg image

angularjs - Webpack AngularJS Sourcemaps 问题

javascript - 蒙戈错误: topology was destroyed(when finding the documents) and instance pool was destroyed (when inserting documents)

javascript - 无法使用 getElementById 检索/显示按钮 ID

javascript - @font-face 无法在 Chrome 中呈现正确的字体系列

html - 在 ion-list 中滚动换行文本

macos - 在 docker 中运行 Webpack-dev-server 比在本地机器上运行要慢得多