The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
having this trouble when I was trying to create a react app
There is an open issue with installing global packages using sudo leaving behind files with the wrong ownership.
The short version is run this to fix the ownership, then try your install again:
sudo chown -R $(whoami) ~/.npm
The long version and canonical bug is: Global installs (sudo npm i -g) fail on Mac after 6.5 upgrade. Works fine after 6.4.1 downgrade.
This issue had similar log: NPM self reporting error while using create-react-app
thanks it worked for me