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';.