Error: EACCES: permission denied, access '/usr/local/lib' npm code example
Example: Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/typescript'
sudo chown -R $USER /usr/local/lib/node_modules
sudo chown -R $USER /usr/local/lib/node_modules