johnpapa / lite-server

Lightweight node server
MIT License
2.31k stars 267 forks source link

Problem with npm install #183

Closed mPyth closed 4 years ago

mPyth commented 4 years ago

Command "npm install lite-server --save-dev" reports an error

Here is the error (from the log file):

113 http fetch GET 304 https://registry.npmjs.org/socket.io 377ms (from cache)
114 silly fetchPackageMetaData error for socket.io@2.1.1 Unexpected end of JSON input while parsing near '...es":{"expresso":"0.9.'

The whole log file is here: https://gist.github.com/mPyth/bb8b1b5bc3df49e89e29782fba6780c9 .

Bug repro steps

npm install lite-server --save-dev

Error is shown and installation is aborted.

Environment

mPyth commented 4 years ago

Remark: I could not reproduce the problem on my home computer, but on office comp I reproduced it three times (in three different directories).

mPyth commented 4 years ago

Problem was with npm cache. After running command npm cache clean --force install passed without problems.