I was trying to install vue-cli using
npm install -g @vue/cli
I get the following error
Unhandled rejection Error: EACCES: permission denied, mkdir '/home/moeketsi/.npm/_cacache/tmp'
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! /home/moeketsi/.npm/_logs/2019-08-02T07_16_39_683Z-debug.log
The log file is available here.
When i try running the command with sudo
I get
sudo: npm: command not found
I'm using node v10.16.1 and npm vesrsion is 6.9.0 . I installed node.js from their website. I tried the following suggestions from this post and from maybe a slightly different case, none of the suggestions helped.