react
react copied to clipboard
[React 19] codemod fails when ~/.codemod does not exist
Summary
When running npx codemod@latest react/19/migration-recipe I get an error like...
Error: ENOENT: no such file or directory, scandir '/home/xxxx/.codemod'
at async readdir (node:internal/fs/promises:948:18)
at async Object.findCredentials (/home/xxxx/.npm/_npx/bef22f83919465d9/node_modules/codemod/dist/index.cjs:32395:12105)
at async CYn (/home/xxxx/.npm/_npx/bef22f83919465d9/node_modules/codemod/dist/index.cjs:32395:12501)
at async DYn.get (/home/xxxx/.npm/_npx/bef22f83919465d9/node_modules/codemod/dist/index.cjs:32405:302)
at async Mne (/home/xxxx/.npm/_npx/bef22f83919465d9/node_modules/codemod/dist/index.cjs:32405:1787)
at async QCi (/home/xxxx/.npm/_npx/bef22f83919465d9/node_modules/codemod/dist/index.cjs:52988:1393)
at async R2e (/home/xxxx/.npm/_npx/bef22f83919465d9/node_modules/codemod/dist/index.cjs:52990:377)
at async Object.handler (/home/xxxx/.npm/_npx/bef22f83919465d9/node_modules/codemod/dist/index.cjs:52990:1075) {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '/home/xxxx/.codemod'
}
If I run mkdir ~/.codemod and then run the command again, it works normally.
Thank you for reporting. I forwarded this to the folks maintaining the codemod CLI.
thanks for flagging. on it.
i cannot reproduce. which OS do you use @aslilac? im testing it on mac.
My work development environment is a bit unconventional because we make (and dogfood) cloud development environment software. 😅
But it's...
- Ubuntu 22.04
- Running in a Docker container
- Using sysbox-runc as the Docker runtime
- ...and the home directory is mounted as a Docker volume (but my user has full read-write permissions)
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!