question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Version: 0.12.0. /usr/bin/env: ‘node\r’: No such file or directory

See original GitHub issue

Execute jscodeshift with an error

/usr/bin/env: ‘node\r’: No such file or directory 

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:44
  • Comments:9

github_iconTop GitHub Comments

16reactions
machtycommented, May 5, 2021

Ran into this because I tried to install with yarn via yarn global add jscodeshift, but yarn doesn’t convert windows line endings

You have to install with npm per the readme (npm converts the line endings):

npm install -g jscodeshift
9reactions
ZhangYiJiangcommented, Jun 12, 2021

Another workaround is to call the jscodeshift bin in node_modules directly, which bypass the shebang at the top of the script -

node node_modules/.bin/jscodeshift -t ...

This is useful if jscodeshift is being called as part of a script, and the package is installed separately or if it’s not possible to use a different package manager

Read more comments on GitHub >

github_iconTop Results From Across the Web

run npm command gives error "/usr/bin/env: node: No such file ...
This happens in version 0.6.x on ubuntu. Does not ... run npm command gives error "/usr/bin/env: node: No such file or directory" #3911....
Read more >
Cannot install NodeJs: /usr/bin/env: node: No such file or ...
This problem does not occur with Ubuntu 20.04. sudo apt-file find /usr/bin/node lists nodejs: /usr/bin/node . That is, installing the nodejs package installs ......
Read more >
"/usr/bin/env: 'node': No such file or directory" even though it is ...
I'm trying to get nodejs working. However, it tells me that node is not in my bin even though I downloaded the binary...
Read more >
Error usr bin env node No such file or directory - Edureka
I installed node js and npm via apt-get install and all of the dependencies, then I installed browserify npm install browserify -g.
Read more >
HTML v5 error when installing - Google Groups
/usr/bin/env: 'node': No such file or directory. node-gyp exited with code: 127. Please make sure you are using a supported platform and node...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found