Hello, trying to use your codeshift-cli, but faced a problem.
I created an example of my codemode repo - https://stackblitz.com/edit/node-uhcfpx?file=index.ts
Here I have a src folder which contains all version transforms. Each has its own motions and so on. Also there is a utils folder with some functions I need across all transformations.
So I'm trying to execute local transform, but getting some errors:
- Trying to execute
codeshift -t ./src/3.0.0/transform.ts ./tmp/foo.tsx - getting an Error: Cannot find module './src/3.0.0/transform.ts'. Looks like cli cannot find a transform file for some reason. Maybe I'm doing something wrong.
- Trying to execute
codeshift ./tmp/foo.tsx - it says that "No transforms specified" but then it gives me a prompt where I can choose a transformation (3.0.0) and then it throws an Error: Cannot find module 'utils'. In my project I have a utils folder and I use it in my transformations, but for some reason cli can not resolve it.
- Tests with jest works fine, so looks like jest can successfully run my codemode with utils (run
jest in console is ok)
Could you please help me to understand and find a problem?
Hello, trying to use your codeshift-cli, but faced a problem.
I created an example of my codemode repo - https://stackblitz.com/edit/node-uhcfpx?file=index.ts
Here I have a
srcfolder which contains all version transforms. Each has its ownmotionsand so on. Also there is autilsfolder with some functions I need across all transformations.So I'm trying to execute local transform, but getting some errors:
codeshift -t ./src/3.0.0/transform.ts ./tmp/foo.tsx- getting anError: Cannot find module './src/3.0.0/transform.ts'. Looks like cli cannot find a transform file for some reason. Maybe I'm doing something wrong.codeshift ./tmp/foo.tsx- it says that "No transforms specified" but then it gives me a prompt where I can choose a transformation (3.0.0) and then it throws anError: Cannot find module 'utils'. In my project I have a utils folder and I use it in my transformations, but for some reason cli can not resolve it.jestin console is ok)Could you please help me to understand and find a problem?