Skip to content

Instantly share code, notes, and snippets.

@kklecho
Created December 9, 2019 01:15
Show Gist options
  • Save kklecho/90f50d6daf06e1006fa1b68cb1748290 to your computer and use it in GitHub Desktop.
Save kklecho/90f50d6daf06e1006fa1b68cb1748290 to your computer and use it in GitHub Desktop.
# npm perm issues when instaling packages globally,
# src: https://stackoverflow.com/questions/33725639/npm-install-g-less-does-not-work
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.profile
source ~/.profile
# try:
npm install -g @vue/cli
# if not working
sudo chown -R $USER ~/.npm-global
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment