Reactjs 无法通过NPM安装Expo CLI

Reactjs 无法通过NPM安装Expo CLI,reactjs,react-native,react-native-android,expo,Reactjs,React Native,React Native Android,Expo,一切正常,我正在运行Expo版本3.11.5,但日志上说要将其更新为3.11.7。 我执行了那个命令,结果毁了我的计划 请在下面查找错误日志 PS C:\Users\MY PC\My_React_Native\fruits-vegetables> npm install --global expo-cli npm WARN deprecated joi@14.0.4: This version has been deprecated in accordance with the hapi

一切正常,我正在运行Expo版本3.11.5,但日志上说要将其更新为3.11.7。 我执行了那个命令,结果毁了我的计划

请在下面查找错误日志

PS C:\Users\MY PC\My_React_Native\fruits-vegetables> npm install --global expo-cli
npm WARN deprecated joi@14.0.4: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated joi@11.4.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated topo@2.0.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek@4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek@6.1.3: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained 
an may contain bugs and security issues.
npm WARN deprecated topo@3.0.3: This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained 
npm WARN rollback Rolling back mime@2.4.4 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\MY PC\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\webpack-pwa-manifest-plugin\node_modules'
npm WARN @expo/image-utils@0.2.12 requires a peer of sharp-cli@^1.10.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code EPERM
npm ERR! syscall unlink
npm ERR! path C:\Users\MY PC\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\.xdl.DELETE\binaries\windows\adb\adb.exe
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\MY PC\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\.xdl.DELETE\binaries\windows\adb\adb.exe'
npm ERR!  [OperationalError: EPERM: operation not permitted, unlink 'C:\Users\MY PC\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\.xdl.DELETE\binaries\windows\adb\adb.exe'] {
npm ERR!   cause: [Error: EPERM: operation not permitted, unlink 'C:\Users\MY PC\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\.xdl.DELETE\binaries\windows\adb\adb.exe'] {
npm ERR!     errno: -4048,
npm ERR!     code: 'EPERM',
npm ERR!     syscall: 'unlink',
npm ERR!     path: 'C:\\Users\\MY PC\\AppData\\Roaming\\npm\\node_modules\\expo-cli\\node_modules\\@expo\\.xdl.DELETE\\binaries\\windows\\adb\\adb.exe'
npm ERR!   },
npm ERR!   stack: "Error: EPERM: operation not permitted, unlink 'C:\\Users\\MY PC\\AppData\\Roaming\\npm\\node_modules\\expo-cli\\node_modules\\@expo\\.xdl.DELETE\\binaries\\windows\\adb\\adb.exe'",
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path: 'C:\\Users\\MY PC\\AppData\\Roaming\\npm\\node_modules\\expo-cli\\node_modules\\@expo\\.xdl.DELETE\\binaries\\windows\\adb\\adb.exe',
npm ERR!   parent: 'expo-cli'
npm ERR! }
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!
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.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\MY PC\AppData\Roaming\npm-cache\_logs\2020-01-24T15_03_46_770Z-debug.log
PS C:\Users\MY PC\My_React_Native\fruits-vegetables> npm i -g expo-cli@3.11.7     
npm WARN deprecated joi@14.0.4: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated joi@11.4.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek@4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated topo@2.0.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated topo@3.0.3: This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained 
an may contain bugs and security issues.
npm WARN deprecated hoek@6.1.3: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained 
an may contain bugs and security issues.
npm WARN rollback Rolling back validator@11.0.0 failed (this is probably harmless): EPERM: operation not permitted, scandir 'C:\Users\MY PC\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\xdl\node_modules'
npm WARN @expo/image-utils@0.2.12 requires a peer of sharp-cli@^1.10.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code EBUSY
npm ERR! syscall rmdir
npm ERR! path C:\Users\MY PC\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\.xdl.DELETE\binaries\windows\adb
npm ERR! errno -4082
**npm ERR! EBUSY: resource busy or locked, rmdir 'C:\Users\MY PC\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\.xdl.DELETE\binaries\windows\adb'**     

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\MY PC\AppData\Roaming\npm-cache\_logs\2020-01-24T17_42_41_316Z-debug.log
PS C:\Users\MY PC\MY\u React\u Native\fruits-vegets>npm安装--global expo cli
npm警告已弃用joi@14.0.4:根据hapi支持策略(hapi.im/support),此版本已被弃用。请升级至最新版本以获得最佳功能、错误修复和安全补丁。如果此时无法升级,则可以为旧版本(hapi.im/commercial)提供付费支持。

npm警告弃用的内核-js@2.6.11:core js@我也面临同样的问题,对我来说最有效的方法是重新启动电脑并重新安装expo cli
。我卸载expo cli,然后重新安装 检查此项也可能有助于遵循以下步骤:(使用终端)

  • 如果已安装并面临问题或希望更新,请卸载以前的版本 npm-g卸载expo cli--保存

  • 只需重新启动电脑即可清除缓存,然后再次安装expo npm安装expo cli--全局

  • 检查是否已安装,并验证版本。简单类型
  • 世博版


    您是否能够使用npm安装任何软件包,或者它只是expo cli?我终于做到了!这是一个错误,错误号:-4048,我重新启动了我的电脑,并清除了NPM缓存,它现在正在工作!谢谢