Reputation: 127
I ran sudo npm i -g expo-cli in terminal.
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/expo-cli
npm ERR! dest /usr/local/lib/node_modules/.expo-cli-dKBr48UN
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/usr/local/lib/node_modules/expo-cli' -> '/usr/local/lib/node_modules/.expo-cli-dKBr48UN'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/matt/.npm/_logs/2021-03-22T18_33_07_275Z-debug.log
Getting this error above and cant figure out how to install expo correctly. Anyone know how to resolve this?
Also, keep getting ZSH permissions denied and the expo command does not exist.
Upvotes: 2
Views: 8959
Reputation: 19
If on Linux Distribution or Mac System, you can fix it by..
remove permissions: sudo -s
go to the directory it tells you in the error, like:
cd /usr/lib/node_modules/expo-cli
then remove the file: rm -r /usr/lib/node_modules/expo-cli
then try installing it again.
sudo npm install -g expo-cli
Upvotes: 0
Reputation: 102
If on Mac or unix system, you can fix it by..
remove permissions: sudo -s
go to the directory it tells you in the error, like:
cd /usr/local/lib/node_modules/expo-cli
then remove the file: rm -r /usr/local/lib/node_modules/expo-cli
then try installing it again.
npm install -g expo-cli
Upvotes: 0
Reputation: 163
navigating to '/usr/local/lib/node_modules/'
delete it
Run sudo npm install --global expo-cli
Upvotes: 0