What does the error 'Could not find module' mean when installing the React Native CLI?

Question

Grade: Education Subject: Support
What does the error 'Could not find module' mean when installing the React Native CLI?
Asked by:
86 Viewed 86 Answers

Answer (86)

Best Answer
(374)
'Could not find module' typically means a dependency is missing or there's a problem with your `node_modules` directory. Try running `npm cache clean --force` followed by `npm install` to clear the cache and reinstall dependencies. If that fails, delete the `node_modules` directory and `package-lock.json` (or `yarn.lock` if you're using Yarn) and run `npm install` again.