webpack: There is another module with an equal name when case is ignored.
i use windows 10 x64 I upgrade node to 6.3.1 version and get:
WARNING in ./modules/ui-js/dom/core/html-parser.js
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.
WARNING in C:/localhost/ui-js/modules/ui-js/dom/core/html-parser.js
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.
This is error for ALL files in path modules/ui-js
Webpack config:
resolve: {
modulesDirectories: ['modules', 'node_modules'],
extensions: ['', '.js', '.coffee']
},
modules
directory i use to storage my custom npm modules
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 22 (6 by maintainers)
Commits related to this issue
- fixes #2815 - force driver letter to lower case — committed to markbjerke/webpack by markbjerke 6 years ago
- fixes #2815 - forces drive letter lower case — committed to markbjerke/webpack by markbjerke 6 years ago
I have the same issue - I get the warning, and the said module is included twice in my bundle.
Env: Windows 7 x64, webpack 1.13.1, node 6.3.0.
webpack config:
(the purpose is to avoid many messy …/…/…/foo/bar style relative imports)
Necessary condition:
import { NAME } from 'folder/constants';
Bundle contains:
NodeJS has a long-standing bug with drive letter casing #6774. You can fix everything else with keeping paths case sensitive and matching the actual path to the resource. The problem is some NodeJS API’s will return uppercase drive letters; __dirname for example.
Webpack doesn’t want to fix this because it’s not really a Webpack issue. However, there is a simple fix in /lib/NormalModule.js which forces the identifier to use a lower case drive letter.
I have started on a pull request but the real solution is to put an option into the CLI that will force the case of the drive letter (only) to either lower or upper case for consistency. It turns out that it’s much harder to update the CLI tools than to fix the webpack code where all is required is a regex and a replacement.
This matters on windows in particular.
https://github.com/nodejs/node-v0.x-archive/pull/6774