title: npm install permission denied (macOS)
body: <p>To install a Bootstrap theme I want to run npm install. However I always receive a permission denied error.</p>
  
  <p>I already tried <code>nvm</code> and then switched with <code>nvm use 10.9.0</code> to run <code>npm install</code>.</p>
  
  <p>I also tried <code>sudo chown -R $(whoami) ~/.npm</code>and <code>sudo chown -R $USER /usr/local/lib/node_modules</code>. Neither solved it and now I am bit out of ideas how I can continue. I use macOS High Sierra.</p>
  
  <pre><code>Marcs-MBP-3:masterclass Marc$ npm install
  npm WARN deprecated gulp-uglifyjs@0.6.2: Since gulp-sourcemaps now works, use gulp-uglify instead
  npm WARN deprecated babel-preset-es2015@6.24.1:   Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! 
  npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist &gt;3.0 config used in other tools.
  npm WARN checkPermissions Missing write access to /Users/Marc/Desktop/Dev/masterclass/node_modules
  npm ERR! path /Users/Marc/Desktop/Dev/masterclass/node_modules
  npm ERR! code EACCES
  npm ERR! errno -13
  npm ERR! syscall access
  npm ERR! Error: EACCES: permission denied, access '/Users/Marc/Desktop/Dev/masterclass/node_modules'
  npm ERR!  { [Error: EACCES: permission denied, access '/Users/Marc/Desktop/Dev/masterclass/node_modules']
  npm ERR!   stack:
  npm ERR!    'Error: EACCES: permission denied, access \'/Users/Marc/Desktop/Dev/masterclass/node_modules\'',
  npm ERR!   errno: -13,
  npm ERR!   code: 'EACCES',
  npm ERR!   syscall: 'access',
  npm ERR!   path: '/Users/Marc/Desktop/Dev/masterclass/node_modules' }
  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/Marc/.npm/_logs/2018-08-22T12_46_51_786Z-debug.log
  </code></pre>