jscodeshift
jscodeshift copied to clipboard
Can't see file in current working directory - "Skipping path which does not exist."
As per my issue at awslabs/aws-sdk-js-codemod#478 I'm unable to run jscodeshift on a file in my current working directory without providing the full path. The error says the file does not exist.
nick@nbp src % ls -la input.js
-rw-r--r-- 1 nick staff 43 Mar 23 09:56 input.js
nick@nbp src % npx jscodeshift -t ~/.npm/_npx/c10ddf24489924c3/node_modules/aws-sdk-js-codemod/dist/transforms/v2-to-v3/transformer.js input.js
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
Skipping path input.js which does not exist.
No files selected, nothing to do.
All done.
Results:
0 errors
0 unmodified
0 skipped
0 ok
Time elapsed: 0.003seconds
nick@nbp src % npx envinfo --system
System:
OS: macOS 13.2.1
CPU: (10) x64 Apple M1 Max
Memory: 2.94 GB / 64.00 GB
Shell: 5.8.1 - /bin/zsh
What happens if you clone the following repository to a non .npm destination (home directory, whatever) and try to run it?
https://github.com/ElonVolo/jscodeshift_litmus
That appears to work fine
nick@nbp jscodeshift_litmus % pwd
/Users/nick/jscodeshift_litmus
% npx jscodeshift -t transform.js input.js
Processing 1 files...
Spawning 1 workers...
Sending 1 files to free worker...
All done.
Results:
0 errors
0 unmodified
0 skipped
1 ok
Time elapsed: 0.838seconds