Skip to content

Cannot find module 'react-dev-utils/workspaceUtils' #5437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bvaughn opened this issue Oct 15, 2018 · 1 comment
Closed

Cannot find module 'react-dev-utils/workspaceUtils' #5437

bvaughn opened this issue Oct 15, 2018 · 1 comment

Comments

@bvaughn
Copy link
Contributor

bvaughn commented Oct 15, 2018

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.)

@bvaughn bvaughn changed the title Cannot find module 'react-dev-utils/prompt' Cannot find module 'react-dev-utils/workspaceUtils' Oct 15, 2018
@bvaughn
Copy link
Contributor Author

bvaughn commented Oct 15, 2018

Just filing this in case it helps anyone else who comes across this issue!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant