Error: Cannot find file: 'index.js' does not match the corresponding name on disk: './node_modules/React/react' [closed] Error: Cannot find file: 'index.js' does not match the corresponding name on disk: './node_modules/React/react' [closed] reactjs reactjs

Error: Cannot find file: 'index.js' does not match the corresponding name on disk: './node_modules/React/react' [closed]


import React from 'React'

should be

import React from 'react'

You are trying to import React instead of react. The name of module is case-sensitive, in this case the name is react.


Notification.js

import React from 'react'const Notifications = () => {return(    <div>        <p>Notifications</p>    </div>)} export default Notifications

ProjectList.js

 import React from 'react' const ProjectList = () => { return(    <div>        <div className="project-list section">            <div className="card z-depth-0 project-summary">                <div className="card-content grey-text darken-3">                    <span className="card-title">Project Title</span>                    <p>Posted by Net Ninja</p>                    <p className="grey-text">3rd September, 2018</p>                </div>            </div>        </div>    </div>)}export default ProjectList

module name is react not React and since imports are case-sensitive import React from 'React' is causing error


So the issue is because you are not importing correctly. Like in my case it was :

import {Dropdown} from 'react-Bootstrap'

I corrected it to

import {Dropdown} from 'react-bootstrap'

Since import statement are case sensitive