react-codemod icon indicating copy to clipboard operation
react-codemod copied to clipboard

Cannot find module 'core-js/modules/web.dom.iterable'

Open yoyo837 opened this issue 3 years ago • 5 comments

Run : npx react-codemod update-react-imports

It report:

image

yoyo837 avatar Oct 15 '20 03:10 yoyo837

I have a very similar error...

obraz

wojtekmaj avatar Oct 22 '20 09:10 wojtekmaj

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

threepointone avatar Oct 22 '20 10:10 threepointone

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.

yoyo837 avatar Oct 22 '20 10:10 yoyo837

I used the force flag and @threepointone 's suggestion, worked for me.

kelly-tock avatar Nov 03 '20 15:11 kelly-tock

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!

colepeters avatar Dec 15 '20 19:12 colepeters