Just made a fresh reinstall of my ubuntu and installed necessarily things such as nodejs npm. If I cloned project and tried sudo npm install I got this error. Had someone same problem?
using node: 8.9.3 npm: 5.5.1
fetchPackageMetaData error for gulp@git://github.com/gulpjs/gulp.git#4ed9a4a3275559c73a396eff7e1fde3824951ebb Command failed: /usr/bin/git clone -q git://github.com/gulpjs/gulp.git /home/user_name/.npm/_cacache/tmp/git-clone-0e191fc9
fetchPackageMetaData /home/user_name/.npm/_cacache/tmp/git-clone-0e191fc9/.git: Permission denied
Error: Command failed: /usr/bin/git clone -q git://github.com/gulpjs/gulp.git /home/user_name/.npm/_cacache/tmp/git-clone-0e191fc9
/home/user_name/.npm/_cacache/tmp/git-clone-0e191fc9/.git: Permission denied
Run “npm config get prefix” in your terminal. This will give the path of global node_modules: For ex: /usr/local. Change the user permissions for this folder by using following command: sudo chown -R <user_id> /usr/local/
On Windows, the cause of this error could be that a PATH or system variable is not correctly set. The error can also occur if you do not have npm or Node. js installed, have an outdated version, or have permission issues.
this solution worked for me
sudo sudo npm install
Just in case the above solution doesn't work, try running:
sudo npm install --unsafe-perm=true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With