compat
compat copied to clipboard
Error: /usr/bin/env: ‘node\r’: No such file or directory
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?
Did you try changing the line ending to see if it works?
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 😊