简体   繁体   English

安装离子时 npm ERR

[英]npm ERR while installing ionic

I am on Windows 10 trying to install Ionic.我在 Windows 10 上尝试安装 Ionic。 I ran the following code in the terminal:我在终端中运行了以下代码:

npm install -g @ionic/CLI

And I get this error:我得到这个错误:

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

I have ran the following commands to debug:我运行了以下命令进行调试:

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

and much more for over a week now.现在还有一个多星期的时间。

I copied and paste this path in windows我将此路径复制并粘贴到 windows

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

Deleted all ionic folders, and then this path删除所有离子文件夹,然后这个路径

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

Deleted some ionic files present as well.也删除了一些存在的离子文件。

Ran npm I -g @ionic/cli and it did install version 6.11.0. Ran npm I -g @ionic/cli 它确实安装了 6.11.0 版。
Thanks everyone, hope it helps someone谢谢大家,希望对某人有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM