1
votes

I am trying to install on my dependencies from an already existing react project using npm install, however, is giving me this error every time now I try to run npm install.

Does anyone know why is this happening now? I have several projects that I have been working on before installing and uninstalling with no problem at all.

npm WARN deprecated [email protected]: Please update: there are crash fixes
npm WARN deprecated [email protected]: use String.prototype.padStart()
npm ERR! path /Users/gabrielnessi/.npm/_cacache/index-v5/35/e4/300bcd6d6b07328b3cffb3509f86bc1ac535a870f8fe27c074a299d8c732
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall open
npm ERR! Error: EACCES: permission denied, open '/Users/gabrielnessi/.npm/_cacache/index-v5/35/e4/300bcd6d6b07328b3cffb3509f86bc1ac535a870f8fe27c074a299d8c732'
npm ERR!  [OperationalError: EACCES: permission denied, open '/Users/gabrielnessi/.npm/_cacache/index-v5/35/e4/300bcd6d6b07328b3cffb3509f86bc1ac535a870f8fe27c074a299d8c732'] {
npm ERR!   cause: [Error: EACCES: permission denied, open '/Users/gabrielnessi/.npm/_cacache/index-v5/35/e4/300bcd6d6b07328b3cffb3509f86bc1ac535a870f8fe27c074a299d8c732'] {
npm ERR!     errno: -13,
npm ERR!     code: 'EACCES',
npm ERR!     syscall: 'open',
npm ERR!     path: '/Users/gabrielnessi/.npm/_cacache/index-v5/35/e4/300bcd6d6b07328b3cffb3509f86bc1ac535a870f8fe27c074a299d8c732'
npm ERR!   },
npm ERR!   isOperational: true,
npm ERR!   stack: 'Error: EACCES: permission denied, open ' +
npm ERR!     "'/Users/gabrielnessi/.npm/_cacache/index-v5/35/e4/300bcd6d6b07328b3cffb3509f86bc1ac535a870f8fe27c074a299d8c732'",
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'open',
npm ERR!   path: '/Users/gabrielnessi/.npm/_cacache/index-v5/35/e4/300bcd6d6b07328b3cffb3509f86bc1ac535a870f8fe27c074a299d8c732',
npm ERR!   parent: 'eslint-plugin-jsx-a11y'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/gabrielnessi/.npm/_logs/2019-06-13T11_28_05_702Z-debug.log```
1
some dependencies need you to have super user access. Try sudo npm installMehul Mittal
@MehulMittal this is the second time it happens and first time I solved with sudo yes, but I don't want to be using sudo every time I have to install a package, is there a way to get my permissions right? thanksGabriel Nessi
What is the path of your projectMehul Mittal
@MehulMittal Documents/react_course/react-complete-guide (on macbook)Gabriel Nessi
do a npm cache clean or npm cache clean --force if it doesn't work try with sudo. Because most probably your cache is corrupted. Then install the packages.Aritra Chakraborty

1 Answers

1
votes

You probably create your project as root, and now you try to install module on the same folder as a simple user. You need to login as root to give permissions to user, or change the folder owner or delete and recreate your project folder