I receive an error when running
$ npm install -g expo-cli
I have tried reinstalling the node modules as An Administrator but the same error occurs.
Environment:
Windows 10,
Node Version: 10.15.3
,
NPM Version: 6.9.0
I expect the install to happen but an error like this occurs:
npm ERR! path C:\Users\Griseld\AppData\Roaming\npm\node_modules\expo-cli\node_modules.xdl.DELETE\binaries\windows\adb\adb.exe npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall unlink npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\Griseld\AppData\Roaming\npm\node_modules\expo-cli\node_modules.xdl.DELETE\binaries\windows\adb\adb.exe' npm ERR! { [Error: EPERM: operation not permitted, unlink 'C:\Users\Griseld\AppData\Roaming\npm\node_modules\expo-cli\node_modules.xdl.DELETE\binaries\windows\adb\adb.exe'] npm ERR! cause: npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\Griseld\AppData\Roaming\npm\node_modules\expo-cli\node_modules.xdl.DELETE\binaries\windows\adb\adb.exe' npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR!
syscall: 'unlink', npm ERR! path: npm ERR!
'C:\Users\Griseld\AppData\Roaming\npm\node_modules\expo-cli\node_modules\.xdl.DELETE\binaries\windows\adb\adb.exe' }, npm ERR! stack: npm ERR! 'Error: EPERM: operation not permitted, unlink \'C:\Users\Griseld\AppData\Roaming\npm\node_modules\expo-cli\node_modules\.xdl.DELETE\binaries\windows\adb\adb.exe\'', npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', npm ERR! path: npm ERR!
'C:\Users\Griseld\AppData\Roaming\npm\node_modules\expo-cli\node_modules\.xdl.DELETE\binaries\windows\adb\adb.exe', npm ERR! parent: 'expo-cli' } npm ERR! 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 (though this is not recommended).
Go through this line from your error log, it says 'C:\Users\Griseld\AppData\Roaming\npm\node_modules\expo-cli\node_modules.xdl.DELETE\binaries\windows\adb\adb.exe' npm ERR!
the expo cli wasn't installing simply because your adb is still using the previously installed expo cli on your system. had similar issue not quite long...kill the process adb.exe
The steps I followed (May this follow help you.)
It worked for me, good luck.
Go to your task manager and kill the process of Adb.exe and boom.
More Simple Solution For Windows 10 Close The Android Emulator.
And restart the system and run npm install -g expo-cli
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With