日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學無先后,達者為師

網站首頁 編程語言 正文

成功解決 npm ERR! /usr/bin/git ls-remote -h -t git://github.com/adobe-webplatform/eve.git

作者:一勺菠蘿丶 更新時間: 2024-01-31 編程語言

問題:

npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t git://github.com/adobe-webplatform/eve.git
npm ERR! 
npm ERR! fatal: read error: Connection reset by peer
npm ERR! 
npm ERR! exited with error code: 128 
npm i 的時候報錯, 如何解決

解決辦法

遇到這種情況,您可以嘗試以下幾種方法來解決 npm i 報錯的問題:

  1. 更換 Git 倉庫的鏈接方式
    這個錯誤通常是因為使用了 git:// 協議,而這個協議在某些網絡環境下可能會被阻塞。您可以嘗試將 git:// 更換為 https://。例如,將 git://github.com/adobe-webplatform/eve.git 更改為 https://github.com/adobe-webplatform/eve.git

  2. 配置 Git 使用 HTTPS 協議(成功解決)
    您可以通過 Git 配置強制使用 HTTPS 協議來替代 git://。執行以下命令:

    git config --global url."https://".insteadOf git://
    
  3. 檢查網絡連接
    這個錯誤可能是由于網絡問題引起的。確保您的網絡連接是穩定的,并且如果您使用的是代理或 VPN,請檢查其設置是否正確。

  4. 清除 npm 緩存
    有時候清除 npm 的緩存可以解決安裝過程中的問題。您可以使用以下命令來清除緩存:

    npm cache clean --force
    
  5. 嘗試重新安裝依賴
    在清除緩存后,重新運行 npm install 命令,看是否能夠成功安裝。

  6. 檢查 package.json
    確保您的 package.json 文件中沒有錯誤,并且所有依賴項都正確無誤。

原文鏈接:https://blog.csdn.net/weixin_39973810/article/details/134557079

  • 上一篇:沒有了
  • 下一篇:沒有了
欄目分類
最近更新