npm install -g expo-cli失败,并显示"EPERM:不允许操作,取消链接'... \ adb.exe" [英] npm install -g expo-cli fails with "EPERM: operation not permitted, unlink '...\adb.exe'

查看:218
本文介绍了npm install -g expo-cli失败,并显示"EPERM:不允许操作,取消链接'... \ adb.exe"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行时收到错误消息

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.

环境: Windows 10, 节点版本:10.15.3, NPM版本:6.9.0

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!小路 C:\ Users \ Griseld \ AppData \ Roaming \ npm \ node_modules \ expo-cli \ node_modules.xdl.DELETE \ binaries \ windows \ adb \ adb.exe npm ERR!代码EPERM npm ERR! errno -4048 npm错误! syscall取消链接npm 呃!错误:EPERM:不允许操作,取消链接 'C:\ Users \ Griseld \ AppData \ Roaming \ npm \ node_modules \ expo-cli \ node_modules.xdl.DELETE \ binaries \ windows \ adb \ adb.exe' npm ERR! {[错误:EPERM:不允许操作,取消链接 'C:\ Users \ Griseld \ AppData \ Roaming \ npm \ node_modules \ expo-cli \ node_modules.xdl.DELETE \ binaries \ windows \ adb \ adb.exe'] npm ERR!原因:npm错误! {错误:EPERM:不允许进行操作, 取消连结 'C:\ Users \ Griseld \ AppData \ Roaming \ npm \ node_modules \ expo-cli \ node_modules.xdl.DELETE \ binaries \ windows \ adb \ adb.exe' npm ERR! errno:-4048,npm错误!代码:"EPERM",npm错误!
syscall:'unlink',npm ERR!路径:npm错误!
'C:\ Users \ Griseld \ AppData \ Roaming \ npm \ node_modules \ expo-cli \ node_modules \ .xdl.DELETE \ binaries \ windows \ adb \ adb.exe' },npm ERR!堆栈:npm ERR! '错误:EPERM:操作不正确 允许,取消链接 \'C:\ Users \ Griseld \ AppData \ Roaming \ npm \ node_modules \ expo-cli \ node_modules \ .xdl.DELETE \ binaries \ windows \ adb \ adb.exe \'', npm ERR! errno:-4048,npm错误!代码:"EPERM",npm错误!系统调用: 'unlink',npm ERR!路径:npm错误!
'C:\ Users \ Griseld \ AppData \ Roaming \ npm \ node_modules \ expo-cli \ node_modules \ .xdl.DELETE \ binaries \ windows \ adb \ adb.exe', npm ERR!父:"expo-cli"} npm错误! npm ERR!该操作是 被您的操作系统拒绝. npm ERR!可能 文件已被使用(通过文本编辑器或防病毒软件),npm ERR!或者 您没有访问权限. npm ERR! npm ERR!如果你 认为这可能是权限问题,请仔细检查npm 呃!文件及其包含目录的权限,或尝试 运行npm ERR!再次以root/Administrator身份执行命令(尽管 不推荐).

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).

推荐答案

从错误日志中浏览这一行,它说 'C:\ Users \ Griseld \ AppData \ Roaming \ npm \ node_modules \ expo-cli \ node_modules.xdl.DELETE \ binaries \ windows \ adb \ adb.exe'npm ERR!

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!

expo cli并不是仅仅因为您的adb仍在使用系统上先前安装的expo cli而安装. 出现类似问题的时间不长...杀死进程adb.exe

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

这篇关于npm install -g expo-cli失败,并显示"EPERM:不允许操作,取消链接'... \ adb.exe"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆