Giter Club home page Giter Club logo

Comments (12)

mattrossman avatar mattrossman commented on September 18, 2024 9

Strangely, the file on GitHub appears to use LF endings, but the one that appears in node_modules installed from the npm Registry uses CRLF. I tried to fork & fix the issue, but I see LF already there in the source. Maybe something weird happened during the latest publish?

So, another workaround is to list the latest version from GitHub as a dependency:

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

from live-server.

kiprasmel avatar kiprasmel commented on September 18, 2024 9

1.2.1 is fine, 1.2.2 is broken

from live-server.

uaru avatar uaru commented on September 18, 2024 5

yarn global add git+https://github.com/tapio/live-server.git#ad22544 fixes the issue.

For zsh you need quotes.

yarn global add 'git+https://github.com/tapio/live-server.git#ad22544'

from live-server.

chavinlo avatar chavinlo commented on September 18, 2024 5

for npm package manager:

apt-install dos2unix
dos2unix  /usr/local/lib/node_modules/live-server/*

from live-server.

nite avatar nite commented on September 18, 2024 4

It seems that 1.2.2 was published from a machine using CRLF line endings. Version 1.2.1 indeed works. PR #404 should prevent these in future.

Should this be merged?

from live-server.

dominicarrojado avatar dominicarrojado commented on September 18, 2024 2

Happen to me as well, the issue doesn't happen with previous version 1.2.1

from live-server.

thescientist13 avatar thescientist13 commented on September 18, 2024 2

Just ran into this as well. Pinning to 1.2.1 as suggested resolved the issue for me.

from live-server.

christopher-besch avatar christopher-besch commented on September 18, 2024 1

This problem is related: yarnpkg/yarn#8106

from live-server.

christopher-besch avatar christopher-besch commented on September 18, 2024 1

yarn global add git+https://github.com/tapio/live-server.git#ad22544 fixes the issue.
Thanks a lot, @mattrossman!

from live-server.

mattrossman avatar mattrossman commented on September 18, 2024

@tapio could you please re-publish the latest version without changing the line endings? I was bitten by this again when installing on a new machine.

from live-server.

AriPerkkio avatar AriPerkkio commented on September 18, 2024

It seems that 1.2.2 was published from a machine using CRLF line endings. Version 1.2.1 indeed works. PR #404 should prevent these in future.

$ grep version node_modules/live-server/package.json
  "version": "1.2.2",
$ file node_modules/.bin/live-server 
node_modules/.bin/live-server: a /usr/bin/env node script text executable, ASCII text, with very long lines (374), with CRLF line terminators

$ grep version node_modules/live-server/package.json
  "version": "1.2.1",
$ file node_modules/.bin/live-server 
node_modules/.bin/live-server: a /usr/bin/env node script text executable, ASCII text, with very long lines (374)

I guess this package is published from local machine instead of CI? That's not good...

from live-server.

kylebakerio avatar kylebakerio commented on September 18, 2024

Running into this... was in 1.2.2, also in 1.2.1, but only when using the --port option...? on a linux machine. doesn't seem to be a problem for coworker on his windows machine.

from live-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.