Create-react-app: New app compiles with eslint equal name warnings on Windows

Created on 6 Jan 2017  路  2Comments  路  Source: facebook/create-react-app

The warning goes away when we run npm run eject for some reason!

Can you reproduce the problem with latest npm?

Yes.

Description

On new app, run npm start command.

Compiled with warnings.

Warning in C:/Dev/.../~/object-assign/index.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 ./~/object-assign/index.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:/Dev/.../~/process/browser.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 ./~/process/browser.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.

You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.

Expected behavior

No eslint warnings on a new app.

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven鈥檛 ejected): [email protected]
  2. node -v: 7.4.0
  3. npm -v: 4.0.5

Then, specify:

  1. Operating system: Windows 7 SP1 with all latest updates.
  2. Browser and version: Not applicable.

Most helpful comment

Saved me so much time, thank you @gaearon. It was just a matter of proper directory capitalization when navigating to the project. (Win10 Git Bash)

All 2 comments

This is actually not an ESLint warning鈥攕eems like webpack emits such warnings by itself in some cases.

My guess is that the way your project directory is on the disk doesn鈥檛 match the way you have it in the shell. For example it might be C:\dev on disk but you might have cd'd into C:\Dev in your shell. This causes all sorts of issues.

I recommend creating a project in the disk root. If the problem goes away, then it was due to some directory naming issue like the one I just described.

Unfortunately there鈥檚 not much I can help you with here, since it鈥檚 always system-specific and usually narrows down to an issue like this.

Saved me so much time, thank you @gaearon. It was just a matter of proper directory capitalization when navigating to the project. (Win10 Git Bash)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fson picture fson  路  3Comments

JimmyLv picture JimmyLv  路  3Comments

barcher picture barcher  路  3Comments

alleroux picture alleroux  路  3Comments

xgqfrms-GitHub picture xgqfrms-GitHub  路  3Comments