Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'env: node\r: No such file or directory' - related to yarn, with reslate v3.0.0-5 #71

Open
n-lina opened this issue Jul 16, 2021 · 6 comments
Assignees

Comments

@n-lina
Copy link

n-lina commented Jul 16, 2021

Bug Description
This command:

npx reslate build

gives this error:

 env: node\r: No such file or directory 

Reverting to version 3.0.0-4 solves this problem.

Steps to reproduce:

  1. install reslate (yarn add reslate)
  2. npx reslate init
  3. npx reslate build

Screenshots
image

Browser:

  • OS: MacOS BigSur
  • Version: 11.4
@n-lina n-lina changed the title Version 3.0.0-5 "build" command error Version 3.0.0-5 "reslate build" error Jul 16, 2021
@MikeRalphson
Copy link
Contributor

Thanks for the report. Just tried it on MacOS 11.4 and could not reproduce (using npm).

Does this happen if you omit the yarn add step, or use npm i or npm i -g instead?

@rtfpessoa
Copy link

I also get it on linux. I am doing yarn add -D reslate

@MikeRalphson
Copy link
Contributor

Are you able to replicate with npm, and not yarn?

@rtfpessoa
Copy link

You are correct. If I use just npm it works.
Any ideas why?

Anyway thanks for the quick help.

@MikeRalphson
Copy link
Contributor

Most reports of this issue seem related to CR/LF line ending issues on the scripts created on install. Why yarn would seem to be getting this wrong, or doing it in a way which is incompatible with npx or cross-var is still unclear.

@MikeRalphson MikeRalphson changed the title Version 3.0.0-5 "reslate build" error 'env: node\r: No such file or directory' - related to yarn, with reslate v3.0.0-5 Jul 23, 2021
@MikeRalphson MikeRalphson self-assigned this Jul 23, 2021
@mavaddat
Copy link

mavaddat commented Feb 11, 2022

# Check that dos2unix exists
if [ ! `command -v dos2unix` ]; then
    sudo apt install -y dos2unix || brew install dos2unix
fi

# For each *.js in cwd, recursively change line endings to Unix style
for filejs in `find . -name "*.js"`; do
    echo "Converting line endings in $filejs"
    dos2unix $filejs
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants