The situation is the following: a Gulp-collector cloned from GitHub (and not for the first time, previous versions were installed and started with a bang), in the same case, when running npm install , it gives an error with gulp-uglify:

 :~/Dropbox/Projects/Gulp/brandly$ npm i npm ERR! Linux 3.16.0-43-generic npm ERR! argv "/usr/bin/nodejs" "/usr/local/bin/npm" "i" npm ERR! node v4.1.0 npm ERR! npm v2.14.3 npm ERR! file /home/user/.npm/gulp-uglify/1.5.1/package/package.json npm ERR! code EJSONPARSE npm ERR! Failed to parse json npm ERR! No data, empty input at 1:1 npm ERR! npm ERR! ^ npm ERR! File: /home/user/.npm/gulp-uglify/1.5.1/package/package.json npm ERR! Failed to parse package.json data. npm ERR! package.json must be actual JSON, not just JavaScript. npm ERR! npm ERR! This is not a bug in npm. npm ERR! Tell the package author to fix their package.json file. JSON.parse 

I tried to reinstall Gulp both globally and locally, all to no purpose. Who will tell you what the snag is and how to solve it?

  • Failed to parse json npm ERR! No data, empty input at 1: 1 npm ERR! npm ERR! ^ - Mike
  • one
    problem with package.json. it is empty, or there is an extra space ... - Mike
  • one
    Remove the package.json file at stackoverflow.com: Installing Gulp with nvm fails - Alex Krass
  • one
    Just delete. - Alex Krass
  • one
    try removing package.json and installing all necessary packages yourself with the flag --save - Alexey Lemesh

1 answer 1

Check your Internet if it is weak then you need to ask someone to send an archive in this assembly. If flax is to do this, you can try npm cache clean or this code doesn’t really know how to write, but npm install --registry http://registry.npmjs.org <package name> helped me