'Expo-Cli failing to install

npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/rocky/.npm-global/lib/node_modules/expo-cli
npm ERR! dest /Users/rocky/.npm-global/lib/node_modules/.expo-cli-QzB5887H
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/rocky/.npm-global/lib/node_modules/expo-cli' -> '/Users/rocky/.npm-global/lib/node_modules/.expo-cli-QzB5887H'

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/rocky/.npm/_logs/2022-05-17T23_07_22_029Z-debug-0.log


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source