1

Relatively new to programming and currently trying to install create-react-app with npm and its giving me this output:

jacobb$ npm install -g create-react-app
        npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
        npm ERR! code EACCES
        npm ERR! syscall access
        npm ERR! path /usr/local/lib/node_modules
        npm ERR! errno -13
        npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
        npm ERR!  [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
        npm ERR!   stack: "Error: EACCES: permission denied, access '/usr/local/lib/node_modules'",
        npm ERR!   errno: -13,
        npm ERR!   code: 'EACCES',
        npm ERR!   syscall: 'access',
        npm ERR!   path: '/usr/local/lib/node_modules'
        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.

        npm ERR! A complete log of this run can be found in:
        npm ERR!     /Users/jacobb/.npm/_logs/2019-12-04T22_00_50_323Z-debug.log 

I've checked permissions and the folder is able to be accessed by everyone, so I don't think that's the issue. I looked up other questions related to this on the site and I wasn't sure if they were the same since everyone else's output seemed to be different. Apologies if this is the same as another question I've missed.

jacobi101
  • 11
  • 1
  • 2
    Try with correct permissions using sudo: `sudo npm install -g create-react-app` – adamz4008 Dec 04 '19 at 22:24
  • You are probably looking for this `npx create-react-app your-apps-folder-name` [Create React App - Getting Started](https://create-react-app.dev/docs/getting-started) – dw_ Dec 04 '19 at 22:26
  • Checkout this answer. Hope it will solve your issue. https://stackoverflow.com/a/51024493/6261066 – jay gajjar Dec 04 '19 at 22:27

0 Answers0