title: npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/n'
body: <p>❯ npm install -g n</p>
  <p>npm ERR! code EACCES</p>
  <p>npm ERR! syscall mkdir</p>
  <p>npm ERR! path /usr/local/lib/node_modules/n</p>
  <p>npm ERR! errno -13</p>
  <p>npm ERR! Error: EACCES: permission denied, mkdir</p>
  <p>'/usr/local/lib/node_modules/n'</p>
  <p>npm ERR!  [Error: EACCES: permission denied, mkdir</p>
  <p>'/usr/local/lib/node_modules/n'] {</p>
  <p>npm ERR!   errno: -13,</p>
  <p>npm ERR!   code: 'EACCES',</p>
  <p>npm ERR!   syscall: 'mkdir',</p>
  <p>npm ERR!   path: '/usr/local/lib/node_modules/n'</p>
  <p>npm ERR! }</p>
  <p>npm ERR!</p>
  <p>npm ERR! The operation was rejected by your operating system.</p>
  <p>npm ERR! It is likely you do not have the permissions to access</p>
  <p>this file as the current user</p>
  <p>npm ERR!</p>
  <p>npm ERR! If you believe this might be a permissions issue, please</p>
  <p>double-check the</p>
  <p>npm ERR! permissions of the file and its containing directories, or try running</p>
  <p>npm ERR! the command again as root/Administrator.</p>
  <p>npm ERR! A complete log of this run can be found in:</p>
  <p>npm ERR!     /Users/peywan/.npm/_logs/2022-03-17T00_34_38_978Z-</p>
  <p>debug-0.log
     ~                                                 243 ✘  at 01:34:39 </p>