7

This question already has an answer here:

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

I keep receiving this output when i try to run something. Any ideas on how to fix this?

marked as duplicate by Jeff Schaller, sebasth, G-Man, mosvy, elbarna Nov 12 '18 at 2:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

Whatever script you are running has, as its first line,

#!/usr/bin/env node

The only issue with this is that it's also a DOS text file. This is evident from the \r in the error message. \r is a common way to encode a carriage return character, and DOS text files have these at the end of each line, before the linefeed character that serves as "newline" on Unix systems.

Convert the script file to a Unix text file using e.g. the dos2unix utility.

Not the answer you're looking for? Browse other questions tagged or ask your own question.