Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't see file in current working directory - "Skipping path which does not exist." #554

Open
xelfer opened this issue Mar 23, 2023 · 2 comments

Comments

@xelfer
Copy link

xelfer commented Mar 23, 2023

As per my issue at aws/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
@ElonVolo
Copy link
Collaborator

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

@xelfer
Copy link
Author

xelfer commented Mar 24, 2023

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 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants