Webpack There are multiple modules with names that only differ in casing

后端 未结 4 1341
[愿得一人]
[愿得一人] 2021-01-23 18:52

I have something like this:

WARNING in C:/Data/.../letsTest.jsx
There are multiple modules with names that only differ in casing.
This can lead to unexpected beh         


        
4条回答
  •  时光说笑
    2021-01-23 19:44

    I just fixed the same warnings on my system, where I'm coding a Create-React-App on Windows 10. Since the Windows file system is not case sensitive, this did not prevent me from continuing to work, but it was ugly to look at on my terminal output. In investigating, none of the available answers helped me. But in a few days of ruminating on the problem I thought of a possible cause. In the recent past I had used npm a couple of times to install modules instead of my usual yarn. Since the warnings were all pointing to node-modules, I decided that could have been a mistake. So here is what I did:

    1. First I merged my develop branch into my master branch, getting everything into one branch.
    2. Next I deleted the entire node_modules folder.
    3. Then I ran yarn install to load all the package.json modules.
    4. Finally I did a yarn start, and the warnings were gone.

    Maybe this will help you.

提交回复
热议问题