【问题标题】:npm install -g expo-cli not completing installationnpm install -g expo-cli 未完成安装
【发布时间】:2019-08-03 19:31:03
【问题描述】:

我正在尝试使用 nvm 安装 expo-cli,但由于某种原因,它会在安装过程中到达某个点,然后停止。

我尝试使用不同的节点版本,并尝试删除可能会阻止安装但仍然没有成功的权限。这是控制台中显示的内容:

npm WARN deprecated joi@14.0.4: This version has been deprecated in accordance with the hapi support policy (hapi.im/sup
port). 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 @babel/polyfill@7.4.4: ? As of Babel 7.4.0, this
npm WARN deprecated package has been deprecated in favor of directly
npm WARN deprecated including core-js/stable (to polyfill ECMAScript
npm WARN deprecated features) and regenerator-runtime/runtime
npm WARN deprecated (needed to use transpiled generator functions):
npm WARN deprecated
npm WARN deprecated   > import "core-js/stable";
npm WARN deprecated   > import "regenerator-runtime/runtime";
npm WARN deprecated joi@11.4.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/sup
port). 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/sup
port). 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/sup
port). 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 dependencie
s 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 dependencie
s as this version is no longer maintained an may contain bugs and security issues.
npm WARN tarball tarball data for @expo/traveling-fastlane-linux@1.9.11 (sha512-xCHnqKfwWYygQfRbi9MGNSG28EHKDtzMB+QDklSH
1GeD90TA0beAjlNF+Z+KPxj28s3WZlQr9yw1AqBS7aipcw==) seems to be corrupted. Trying one more time.

【问题讨论】:

  • 您是否尝试在运行nvm install 命令之前添加sudo?如果你使用的是 Mac 或 Linux
  • 我目前在 Windows 10 上并使用 powershell。如果有帮助,我也一直以管理员身份运行 powershell。

标签: react-native npm expo nvm


【解决方案1】:

您使用的是哪个终端?如果是 GitBash,所以出现问题,尝试使用任何其他终端,它可以工作。

【讨论】:

    【解决方案2】:

    我在 Windows 10 的命令行(而不是 powershell)上遇到了同样的问题(“@expo/traveling-fastlane-linux@1.9.11 的压缩包数据似乎已损坏”),并以管理员身份运行 cmd解决了这个问题。

    【讨论】:

      【解决方案3】:

      我也有同样的问题。看起来是权限问题。在documentation 之后,我使用节点版本管理器重新安装 npm。由于我是 linux 用户,我使用 nvm(查看文档以选择适合您系统的管理器)。

      卸载 npm 和 node 后,我运行:

      curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
      

      检查安装使用:

      command -v nvm
      

      输出必须是nvm

      最后,运行:

      npm install -g expo-cli
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2020-03-11
        • 1970-01-01
        • 2021-02-13
        • 2021-08-25
        • 2020-12-19
        • 1970-01-01
        • 2018-07-30
        相关资源
        最近更新 更多