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

21,975

Solution 1

I solved it by finding that autosync.sh somewhere in my projects hidden and changed file format to Unix and boom it worked.

Solution 2

In VSCODE you can use: VSCODE Editor Bar

LF can be changed in CRLF and back

Solution 3

You get this error message simply because the /dev folder is not in /bin. It is directly in the /flutter folder so change your path this way solve this problem:

export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter"
Share:
21,975
Priyal
Author by

Priyal

Nerdy Coder

Updated on May 31, 2021

Comments

  • Priyal
    Priyal over 1 year

    I am having an issue after setting up docker in Linux terminal in win10. When I am trying to build it shows following error.

    /usr/bin/env: ‘bash\r’: No such file or directory
    ERROR: Service 'magento2' failed to build: The command '/bin/sh -c /opt/docker/bin/service.d/autosync.sh install     && docker-service-enable autosync' returned a non-zero code: 127
    

    Is it git line ending bug and how can I solve it?