Skip to content

Instantly share code, notes, and snippets.

@whoisryosuke
Last active August 13, 2021 19:38
Show Gist options
  • Select an option

  • Save whoisryosuke/d0205d62dce90f2e94284ab24658ee1c to your computer and use it in GitHub Desktop.

Select an option

Save whoisryosuke/d0205d62dce90f2e94284ab24658ee1c to your computer and use it in GitHub Desktop.
NPM - Fix permission denied error when installing npm dependencies/modules
sudo chown -R `whoami` ~/.npm
sudo chown -R `whoami` /usr/local/lib/node_modules

Fixes this error

$ npm i -g npm
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/ansi-align

via: https://stackoverflow.com/a/21014041

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment