Description
This error was recently reported on one of my GitHub repos and a quick Google search has shown it mentioned in a couple of others:
Error: Cannot find module 'react-dev-utils/workspaceUtils'
It looks like the error is caused by the following line in the ejected config/paths.js
for some older versions of create-react-app
:
const findMonorepo = require('react-dev-utils/workspaceUtils').findMonorepo;
The line in question is no longer there. (It was added in 2c34d5b and removed in cc328d6.) So I'm guessing this issue is only affect apps that installed a pre-release of 2.0 and ejected in between those commits.
If you're not using the monorepo feature– I believe a quick fix for those experiencing this issue would be to just manually edit that ejected config file to remove the line in question. If you are using it, I think the appropriate fix would be to manually replace the contents of config/paths.js
with the latest revision. (No new dependencies are introduced so I think this should be safe to do.)