tapio / live-server

A simple development http server with live reload capability.
http://tapiov.net/live-server/
4.4k stars 484 forks source link

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

Open garyo opened 1 year ago

garyo commented 1 year ago
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

Rabbitzzc commented 12 months ago

me too...

Rabbitzzc commented 12 months ago

use this.

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