npm install EACCES: permission denied mkdir 

Error while running the npm install command:

npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules....

Solution is to change the owner of npm directories to the current user, current user is represented by $(whomi)

sudo chown -R $(whoami) /usr/local/{lib/node_modules,bin,share}
sudo chown -R $(whoami) ~/.npm

You will be able to run the npm install command with any error now.