Jo Micheal
Published in : 2021-06-10
Hello there,
Please I am facing a big error in my new react js app
Failed to compile../src/Homepage.jsCannot find file: 'index.js' does not match the corresponding name on disk: '.\node_modules\React\react'.
and the screenshot is attached below,
Please help :(
Join our community and get the chance to solve your code issues & share your opinion with us
Sign up Now
Mohamed Atef Date : 2021-06-10
Best answers
51
Best answers
51
Welcome back, Jo
Nice to see you again,
This is a common error that happens for beginners so all you need to do is just fix the name of react library at the first line so it should be react with small r instead of React
Jo Micheal Date : 2021-06-10
Works fine!! thanks :)
Stephen Jones Date : 2021-09-21
I have the same error but it is not because of the index.js import statement which is:
import React from 'react';
The actual message suggests an issue with node modules:
Cannot find file: 'index.js' does not match the corresponding name on disk: './node_modules/React/react'.
There isn't a reference to React/react in the node modules
any other suggestions? This is driving me crazy!
Jo Micheal Date : 2021-09-21
Hey Stephen i suggest if you re-installed the reactjs
or you can update the npm packages by
let me know if you solved the issue
Best regards
yash dikshit Date : 2021-11-26
i am applying your method but same error occured
yash dikshit Date : 2021-11-26
./src/component/Navbar.js
Cannot find file: 'index.js' does not match the corresponding name on disk: '.\node_modules\Prop-types\prop-types'.
Mohamed Atef Date : 2021-11-26
What is the code which you are using? Can you try
& make sure there is no { }
otherwise please make sure that the package is already there & if it's there in the node_modules you can use diffferent version