node.jsreact-nativenpmexpo

Cant upgrade Expo CLI


I am facing a problem while upgrading the expo cli.

After running npm install -g expo-cli it runs the command for like 3-5 min and then it exits with an error

errno: -4048``code: EPERM

I tried running the VSCode terminal as an Admin and also tried installing it with CMD ran as Administrator same errors.

Some additional info text:

npm ERR! The operation was rejected by your operating system.

npm ERR! It's possible that the file was already in use (by a text editor or antivirus),

npm ERR! or that you lack permissions to access it.
npm ERR!

npm ERR! If you believe this might be a permissions issue, please double-check the

npm ERR! permissions of the file and its containing directories, or try running

npm ERR! the command again as root/Administrator.

I also closed the emulator and VS Code while installing it but with no luck.


Solution

  • Okay so the fix for anybody having the same issue was to kill the adb.exe process. After that it ran faster and without an error!