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

On mac, installed live-server but the main script has CRLF line terminators #418

Open
garyo opened this issue Jul 17, 2023 · 3 comments
Open

Comments

@garyo
Copy link

garyo commented Jul 17, 2023

Before submitting an issue, please, see https://github.com/tapio/live-server#troubleshooting

Issue description

I did yarn add --dev live-server followed by npx live-server but I get this error:

env: node\r: No such file or directory

which is caused by the main live-server.js script having CRLF line endings:

% file node_modules/live-server/live-server.js 
node_modules/live-server/live-server.js: a /usr/bin/env node script text executable, ASCII text, with very long lines (374), with CRLF line terminators

If I fix the line endings manually it works.

Software details

  • Command line used for launching live-server: npx live-server
  • OS: MacOS
  • Browser (if browser related):
  • Node.js version:
  • live-server version: ^1.2.2
@Rabbitzzc
Copy link

me too...

@Rabbitzzc
Copy link

use this.

"devDependencies": {
		"live-server": "git+https://github.com/tapio/live-server.git#ad22544",
	},

@JBramEu
Copy link

JBramEu commented Sep 16, 2024

Or use npm (npx), which (unlike yarn) automatically fixes this

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

3 participants