compat icon indicating copy to clipboard operation
compat copied to clipboard

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

Open ptri opened this issue 5 years ago • 2 comments

I'm trying to use this on a linux OS and I'm getting the following error:

$ compat --target assets/js/
/usr/bin/env: ‘node\r’: No such file or directory

I think it's coming from: https://github.com/jgardella/compat/blob/5b749e5cd60faec2a6722cb01e4152760af4021f/src/index.js#L1

I debugged with

$od -c index.js | head

and I got:

0000000   #   !       /   u   s   r   /   b   i   n   /   e   n   v    
0000020   n   o   d   e  \r  \n   l   e   t       y   a   r   g   s    

So, I'm guessing my shell doesn't like these windows(?) line endings?

ptri avatar Sep 23 '19 11:09 ptri

Did you try changing the line ending to see if it works?

BetoFrega avatar Oct 10 '19 13:10 BetoFrega

Did you try changing the line ending to see if it works?

 @fregadev thank you, it worked for me. I used dos2unix and it worked like a charm 😊

IsmiKin avatar Feb 19 '20 10:02 IsmiKin