How do I fix module not found: error: can't resolve 'web-vitals'?

To fix the “Module not found: Error: Can’t resolve 'web-vitals'” error, run npm install web-vitals in your project directory to properly install the missing package.
 
To fix the “Module not found: Error: Can’t resolve 'web-vitals'” error, run npm install web-vitals or yarn add web-vitals in your project directory. This installs the missing package. Then, restart your development server. Ensure your import statement matches the module name exactly: import { getCLS } from 'web-vitals';.
 
Back
Top