If I've recently installed a new package, but the 'Module not found' error persists, what should I do?

Responsive Ad Header

Question

Grade: Education Subject: Support
If I've recently installed a new package, but the 'Module not found' error persists, what should I do?
Asked by:
102 Viewed 102 Answers
Responsive Ad After Question

Answer (102)

Best Answer
(320)
After installing a new package, always restart your Create React App development server. CRA caches module resolutions, and a restart forces it to re-evaluate the dependencies. If that doesn't work, try deleting your `node_modules` folder and running `npm install` or `yarn install` again to ensure a clean installation.