codemod
codemod copied to clipboard
[cli] codemod index.cjs detection fails on GitHub Actions
HI there,
I'm trying to run codemod on Github Actions using the following npx command:
npx codemod --source /path/to/my-codemod-repo --target /path/to/my-target-repo
But it seems like the index.cjs
detection doesn't work.
Output:
Run ls -la /path/to/my-codemod-repo/dist
total 12
drwxr-xr-x 2 runner docker 4096 Jun 27 22:23 .
drwxr-xr-x 8 runner docker 4096 Jun 27 22:23 ..
-rw-r--r-- 1 runner docker 2027 Jun 27 22:23 index.cjs
npx codemod --source /path/to/my-codemod-repo --target /path/to/my-target-repo
npm warn exec The following package was not found and will be installed: [email protected]
Could not find the main file of the codemod with name index.cjs. Did you forget to run "codemod build"?
I tried both with the index.cjs
committed to my repo and running codemod build
in the previous steps of the pipeline, but nothing seems to help.
Looks like an issue with this function, but so far I am not sure what could be going wrong: https://github.com/codemod-com/codemod/blob/main/apps/cli/src/utils.ts#L133.