Create-react-app: There are multiple modules with names that only differ in casing.

Created on 16 Dec 2017  路  11Comments  路  Source: facebook/create-react-app

Hi developers,

Here is a warning after I run these two command lines. I'm in windows server environment.

  1. create-react-app xxx
  2. npm install && npm start

node_modules/object-assign/index.js
There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:

  • xx\node_modules\object-assign\index.js
    Used by 1 module(s), i. e.
    xx\node_modules\react-scripts\config\polyfills.js
  • xx\node_modules\object-assign\index.js
    Used by 2 module(s), i. e.
    xx\node_modules\react\cjs\react.development.js

Thanks!

Most helpful comment

I resolve mine like this lol, just incase. only if we have similar warning: WARNING in ./node_modules/React/cjs/react.development.js .

import React from "React"; to import React from "react;"

just made the casing lowercase of the module imported.

All 11 comments

I solve this problem by cd Home instead of cd home.
Thanks to https://github.com/facebook/react/issues/10667.

i have same problem here and i already user lowercase can you help?

Had the same problem on Windows while using Powershell. Deleted all from node_modules and ran npm install in Git CMD and everything was fine.
Found out that "cd folder" and "cd Folder" is not the same in Powershell. It's case-sensitive in some strange way.

@potaty Thanks

I resolve mine like this lol, just incase. only if we have similar warning: WARNING in ./node_modules/React/cjs/react.development.js .

import React from "React"; to import React from "react;"

just made the casing lowercase of the module imported.

I had the same issue when using create-react-app via Powershell on Win10 machine. When I used create-react-app via cmd, there was no issue. Seems to me that Powershell is not playing nice with create-react-app.

Just replace cd c:/users/username/desktop/project-folder with cd C:/Users/username/Desktop/project-folder

It's all about capital and lower case letters in your path, make sure that you're navigating to your project folder with the whole path have the correct casing.

@chaineater thank's you help me lot.

Somebody help me please...
My project is located at
_J:\Projects\myProject\front-end>_ and looks like all components are importing react using this code: import React from "react;"

I'm opening cmd by going to the folder using file explorer, click over the current path box and entering cmd

screenshot 35
and then I starts react development server by running npm start

@Shaker-Hamdi thank you, I did not know why I was having this error, your reply has helped me as well. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

onelson picture onelson  路  3Comments

ap13p picture ap13p  路  3Comments

oltsa picture oltsa  路  3Comments

barcher picture barcher  路  3Comments

alleroux picture alleroux  路  3Comments