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

Unable to run CLI due to invalid line endings on Linux #238

Closed
tehlordvortex opened this issue Nov 16, 2018 · 6 comments · May be fixed by MuskieMedic/platform#4, rwblokzijl/stablecoin-exchange#36 or halil/nginxconfig.io#5

Comments

@tehlordvortex
Copy link

After installing ecstatic with yarn global add ecstatic, I'm unable to run the command. It dies with the following error message:
/usr/bin/env: ‘node\r’: No such file or directory
This seems to be an issue with the code using CRLF line-endings instead of just LF on Linux.

OS: Ubuntu 18.04 LTS 64bit
Node version: 10.10.0
Yarn version: 1.12.1

@tehlordvortex tehlordvortex changed the title Error with line endings on Linux Unable to run CLI due to invalid line endings on Linux Nov 16, 2018
@thornjad
Copy link
Contributor

thornjad commented Feb 6, 2019

@tehlordvortex could you try reinstalling the package? Examining the files with hexdump shows Unix-only, no \r's, so I'm thinking it may be on your end (maybe something with Yarn?).

@kla
Copy link

kla commented Feb 10, 2019

I'm seeing the same thing. Seems to only happen when using the symlink in .bin:

$ node_modules/.bin/ecstatic 
env: node\r: No such file or directory

$ node node_modules/ecstatic/lib/ecstatic.js
ecstatic serving /tmp/test at http://0.0.0.0:8000

If I run dos2unix on ecstatic.js that will fix it:

$ dos2unix node_modules/ecstatic/lib/ecstatic.js 
dos2unix: converting file node_modules/ecstatic/lib/ecstatic.js to Unix format...

$ node_modules/.bin/ecstatic 
ecstatic serving /tmp/test at http://0.0.0.0:8000

@jfhbrook
Copy link
Owner

possible that the deploy package has windows line endings on accident? I think the last release or two were via windows...

@jfhbrook
Copy link
Owner

ok try 3.3.1 and lmk

@kla
Copy link

kla commented Feb 10, 2019

Works!

$ node_modules/.bin/ecstatic 
ecstatic serving /tmp/test at http://0.0.0.0:8000

@jfhbrook
Copy link
Owner

Great! Unfortunate that npm publish on windows is busted 🙄 but glad to fix!

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