Getting Permission Denied Error when Installing with NPM
See original GitHub issue- Node Version: v8.2.0
- Npm Version: 5.2.0
- Platform: Darwin Junies-MacBook-Pro-2.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
- Package Version:
When I run sudo npm install contentful
I get the following error:
npm ERR! code 1
npm ERR! Command failed: /usr/local/bin/git clone --depth=1 -q -b fix/https-via-http-proxy git://github.com/contentful/axios.git /Users/juniethreatt/.npm/_cacache/tmp/git-clone-e4d5168e
npm ERR! /Users/juniethreatt/.npm/_cacache/tmp/git-clone-e4d5168e/.git: Permission denied
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/juniethreatt/.npm/_logs/2017-11-30T21_24_50_080Z-debug.log
I previously have "contentful": "^4.3.0",
installed, but while trying to update other node packages, I got that error and now it seems it’s not installed at all anymore
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Resolving EACCES permissions errors when installing ...
Resolving EACCES permissions errors when installing packages globally · Reinstall npm with a node version manager · Manually change npm's default directory.
Read more >I get "access denied" on `npm install` - node.js - Stack Overflow
I just super user do it: sudo npm install -g. for global stuff. and just: sudo chown -R [user]:[user] /projects/.
Read more >Fixing npm permission issue - Kaustubh Talathi - Medium
Run “npm config get prefix” in your terminal. This will give the path of global node_modules: For ex: /usr/local · Change the user...
Read more >NPM Install - Resolving EACCES Permissions Denied
How to resolve eacces permissions denied when installing npm packages globally. Here's how you solve this issue in a couple of minutes.
Read more >Fix NPM EACCES permission denied errors ... - YouTube
How to fix eacces permission denied errors with npm when installing a global package using Ubuntu. ... Eacces error with global npm.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I did
sudo npm cache clean -f
For me that did the trick
Sounds like a problem related to your machine for me. Also, you should never use
sudo
in combination with npm. I’d guess your file permissions are broken in your npm folder, you may try:/Users/juniethreatt/.npm/
recoursively to your user.See here: