I'm new to React, I just set up the whole thing and when I run the command "npm run start" I am getting the error :

Module not found: Error: Can't resolve './reportWebVitals' in 'C:\Users\Robert Langdon\Documents\MERN\React\01tut\src

I have attached the snapshot of the error: Screenshot of the error

I have looked out for the similar problem and I have tried everything it still throws error, I have tried the following steps ways :

1. npm install --save-dev web-vitals
2. I have tried Deleting node_modules and reinstall the dependencies.
3. I have already checked for devDependencies in my package.json

Please help out I'm stuck here

1

There are 1 best solutions below

0
Kai Pereira On

ReportWebVitals is a file inside of src/ . So make sure that the file exists. If it doesn't, then add it in (reportWebVitals.js).

enter image description here

Make sure that it also has the right code in it:

enter image description here

Your error is module not found so I have the feeling that the file isn't actually there at all!

If you can, please provide the source code if this doesn't work!