webpack: Warning "There is another module with a equal name when case is ignored."
Today when I build my project, webpack warns me a lot like this:
WARNING in ./~/fluxxor/~/lodash-node/modern/internals/baseCreate.js There is another module with a equal name when case is ignored. This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. Rename module if multiple modules are expected or use equal casing if one module is expected.
WARNING in ./~/Fluxxor/~/lodash-node/modern/internals/baseCreate.js There is another module with a equal name when case is ignored. This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. Rename module if multiple modules are expected or use equal casing if one module is expected.
It was fine yesterday. I don’t know what is wrong. There is only fluxxor
in node_modules
. I have tried to remove node_modules
directory completely and then re-install. But it doesn’t help.
I’m on OS X 10.9.4. Any ideas?
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Reactions: 63
- Comments: 56
Commits related to this issue
- Remove protobuf file warnings See these for more info: https://github.com/dcodeIO/protobuf.js/commit/1216ca8382462ccc92090b2569375e596886e343 https://github.com/webpack/webpack/issues/382 https://gi... — committed to getcircle/circle-web by ravirani 9 years ago
- Fix: webpack module resolve warnings * https://github.com/webpack/webpack/issues/382 — committed to ankurk91/vue-flatpickr-component by ankurk91 7 years ago
- Fix: webpack module resolve warnings * https://github.com/webpack/webpack/issues/382 — committed to antonparussimov/vue-flatpicker by antonparussimov 7 years ago
I have found the answer. In a file, I made a typo:
The filesystem is case-insensitive, so webpack will compile the same file twice.
Thanks for the help, this fixed my problem…after a lot of searching. This warning message should be a lot smarter and should actually point to the problematic line in question, enough with this guessing wizardry shit…
Thank you so much for sharing.
In my case, I did
😦
确实是这样的,我用的是import,把后面要引入的模块改为小写就行了
really can’t believe how this error message doesn’t show the file where it was detected, makes me afraid to refactor
文件夹名为 fluxxor 进入的 时候 却以 Fluxxor 引入, var fluxxor = require(‘Fluxxor’); //should be require(‘fluxxor’)
大小写不一造成的, (英文看不懂,我翻译了 上面那哥们儿的回复)
As others have mentioned, please improve the error message and make it possible to suppress the warning to avoid huge log outputs of file path to every single source file.
This warning should be very much explicit for a simple problem like that. It lacks the file where the problem have been found…
I had this warning also. It took me two hours to find it. I am on a Mac. What I did, was delete the module in question. Empty my trash. Re-create the module from scratch.
Then I ran flow, which took me straight to the actual error.
Before this “delete the file and empty the trash” exercise, Flow was not reporting the bug. Only webpack was reporting the error. But webpack’s error was not helpful.
So it sounds like some kind of file system issue?
problem(Error case): WARNING in
./components/common/NoData.jsx
There is another module with an equal name when case is ignored. This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. Rename module if multiple modules are expected or use equal casing if one module is expected. Answer: It is a kind of Warning, Remind us of right writing(case-semantic
). Answer(Right case):./component/Common/NoData.jsx.
quick search through all my files for each version of the file it reports but in lowercase (it was reporting it in a file as Uppercase found the two references where I’d got the wrong case. Luckily I’m on windows (although some of you will laugh at the lucky part) so its not case sensitive but I wanted the warning message to disappear 😃
Example:
Filename is actually: Price.jsx
searched for: price.jsx to find the references it was complaining about.