react-codemod
react-codemod copied to clipboard
Cannot find module 'core-js/modules/web.dom.iterable'
Run :
npx react-codemod update-react-imports
It report:
I have a very similar error...
![obraz](https://user-images.githubusercontent.com/5426427/96856095-d7cd4480-145d-11eb-8797-1541bd403ce7.png)
Can i recommend trying running this from outside the codebase? So, instead of
cd ydmap-web-clone
npx react-codemod update-react-imports
try
npx react-codemod update-react-imports ydmap-web-clone
I got this:
tanghui@tanghuideMacBook-Pro ydmap % npx react-codemod update-react-imports ydmap-web-cloud/
npx: 435 安装成功,用时 8.778 秒
fatal: not a git repository (or any of the parent directories): .git
Thank you for using react-codemods!
But before we continue, please stash or commit your git changes.
You may use the --force flag to override this safety check.
I used the force flag and @threepointone 's suggestion, worked for me.
For posterity/findability: I ran into this issue with the array error captured above (Error: Cannot find module 'core-js/modules/es.array.filter'
). I had to run the codemod from outside the project directory and with the --force
flag to get it to work, but work it did!