7
/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?

Kusalananda
  • 320,670
  • 36
  • 633
  • 936

1 Answers1

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.

Kusalananda
  • 320,670
  • 36
  • 633
  • 936