gulpjs / gulp-cli

Command Line Interface for gulp.
MIT License
401 stars 106 forks source link

cannot install with npm #180

Closed ray007 closed 5 years ago

ray007 commented 5 years ago

I tried to install new gulp with instructions from gulp-quickstart, but it does not work: npm install --global gulp-cli results in

npm ERR! Unexpected end of JSON input while parsing near '...mckVt2DO5KIEuctTGJAyd'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\username\AppData\Roaming\npm-cache\_logs\2019-02-18T09_20_54_979Z-debug.log

Since installing modules other than gulp/gulp-cli works, there seems to be a problem with the gulp published to npmjs. All this on Win10 x64.

ray007 commented 5 years ago

Update: I did verify the problem exists only in Windows cmd, doing the install in the linux subsystem works. Which doesn't help me, since the target build system needs to run in Windows cmd.

ray007 commented 5 years ago

I was asked for versions in the gitter chatroom, so also more info here:

$ node --version
v10.15.1

$ npm --version
6.8.0

Looking for the JSON end in the logfile, I find the following line:

154 silly fetchPackageMetaData error for rechoir@^0.6.2 Unexpected end of JSON input while parsing near '...mckVt2DO5KIEuctTGJAyd'
ray007 commented 5 years ago

Something very strange just happened: to get more information, I added --verbose to the install command, and suddenly it worked. Any explanation for this?

phated commented 5 years ago

Sounds like your npm was in a weird state. Glad you got it solved.

parduman commented 4 years ago

Something very strange just happened: to get more information, I added --verbose to the install command, and suddenly it worked. Any explanation for this?

i got into same problem i got it worked by adding sudo in front and --verbose in end