I have git dependencies in my package.json file. When I do sudo npm install in my react app folder, I get this error
npm ERR! code 1
I don't know whether your problem is solved or not. Today i faced the same issue the problem was ~/.npm folder is messing with permission so I changed permission as sudo chown -R $(whoami) ~/.npm and it is working fine.
sudo chown -R $(whoami) ~/.npm