问题
ERR! code 1
npm ERR! Command failed: /usr/bin/git clone -q git://github.com/react-navigation/react-native-tab-view.git /Users/nakul/.npm/_cacache/tmp/git-clone-818101c2
npm ERR! /Users/nakul/.npm/_cacache/tmp/git-clone-818101c2/.git: Permission denied
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/nakul/.npm/_logs/2018-04-14T10_46_28_136Z-debug.log
回答1:
Try chmod -R 777 ~/.npm
then reinstall.
Or rm -rf ~/.npm
and reinstall. ~/.npm
is a temp directory and can be safely deleted. npm will recreate this directory with right permissions.
来源:https://stackoverflow.com/questions/49830842/i-am-getting-npm-error-while-installing-react-navigation-do-anyone-know-about-t