【问题标题】:npm ERR while installing ionic安装离子时的npm ERR
【发布时间】:2020-12-02 11:15:37
【问题描述】:

我在 Windows 10 上尝试安装 Ionic。我在终端中运行了以下代码:

npm install -g @ionic/CLI

我得到这个错误:

npm ERR! code EEXIST
npm ERR! path C:\Users\Lari\AppData\Roaming\npm\ionic.ps1
npm ERR! Refusing to delete C:\Users\Lari\AppData\Roaming\npm\ionic.ps1: is outside C:\Users\Lari\AppData\Roaming\npm\node_modules\@ionic\cli and not a link
npm ERR! File exists: C:\Users\Lari\AppData\Roaming\npm\ionic.ps1
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with force to overwrite files recklessly.

npm ERR! A complete log of this can be found in:
npm ERR! C:\Users\Lari\AppData\Roaming\npm-cache\_logs\2020-08-12T22_24_22_577Z-debug.log

我已运行以下命令进行调试:

  • npm uninstall -g ionic
  • npm install -g @ionic/cli
  • npm install -g cordova @ionic/cli

现在还有一周多的时间。

【问题讨论】:

    标签: node.js angular cordova ionic-framework npm


    【解决方案1】:

    我将此路径复制并粘贴到 windows 中

    C:\Users\Lari\AppData\Roaming\npm\ionic

    删除所有离子文件夹,然后是这个路径

    C:\Users\Lari\AppData\Roaming\npm

    删除了一些存在的离子文件。

    运行 npm I -g @ionic/cli,它确实安装了 6.11.0 版。
    谢谢大家,希望对大家有帮助

    【讨论】:

      猜你喜欢
      • 2015-09-09
      • 1970-01-01
      • 1970-01-01
      • 2018-08-22
      • 2016-01-23
      • 1970-01-01
      • 2015-08-31
      • 2022-01-17
      • 1970-01-01
      相关资源
      最近更新 更多