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

后端 未结 4 1451
[愿得一人]
[愿得一人] 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:35

    From Contributing.md in create-react-app:

    The scripts in tasks folder and other scripts in package.json will not work in Windows out of the box. However, using Bash on windows makes it easier to use those scripts without any workarounds.

    so, the easier way is to just install Bash and npm install there. the steps are:

    Install Bash on Ubuntu on Windows

    A good step by step guide can be found here

    Install Node.js and yarn

    Even if you have node and yarn installed on your windows, it would not be accessible from the bash shell. You would have to install it again. Installing via nvm is recommended.

    Line endings

    By default git would use CRLF line endings which would cause the scripts to fail. You can change it for this repo only by setting autocrlf to false by running git config core.autocrlf false. You can also enable it for all your repos by using the --global flag if you wish to do so.

提交回复
热议问题