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

Hi when I run a certain npm package in circleci, it print error like: /usr/bin/env: ‘node\r’: No such file or directory. But it run perfectly in my laptop. So didn’t know what happened and what should I do. Hope someone could help me. Thanks.

\r indicates that there is an extra carriage return in your configuration file or something. Could you please share your entire CircleCI config?

Oh I see. I found I commit the file with Windows-style line break in the bin entry file of my npm package. And the first line originally was used to declare this file will be executed by Node.js, so it failed with the additional \r character. After setting git config core.autocrlf input and re-commit the problem was solved.

Thanks.

1 Like