-
Notifications
You must be signed in to change notification settings - Fork 290
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
Cannot find module 'core-js/modules/es.array.find' #249
Comments
I'm unable to reproduce this on my machine with the same node/npm version. Could you help by isolating this to a single file/code pattern that this fails on? |
Hi!, The error happen when run command above in a project use babel with core-js@3. Please download this project, run npm install and run |
Nice catch! I can reproduce it now. The workaround (for now) is to run react-codemod from outside the project folder. So instead of cd my-project
npx react-codemod rename-unsafe-lifecycles You can run npx react-codemod rename-unsafe-lifecycles my-project This will ensure that react-codemod will use its own dependency versions, and run the transforms as expected. I'll make a proper fix for this later, and will leave this issue open until then. Thanks again! |
This same underlying issue, which appears to be running
This seems like something that people might regularly run into. Would it be worth updating the readme to instruct people to run |
Google brought me here and @jasontk19's answer helped. TL;DR: Run If you don't, If where you run @dartess Thanks for the tip. |
If the parent directory is not a git repository, you will need to add the flag |
I run command
npx react-codemod rename-unsafe-lifecycles src
and got this error:It run on node v12.12.0 and npm v6.12.1
The text was updated successfully, but these errors were encountered: