網(wǎng)站首頁 編程語言 正文
目錄
一、遇到問題
二、解決辦法?
方法一?
方法二
方法三
方法四
一、遇到問題
npm ERR! Error while executing:
npm ERR! D:\IT_base\git\Git\cmd\git.EXE ls-remote -h -t ssh://git@github.com/sohee-lee7/Squire.git
npm ERR!
npm ERR! fatal: unable to access 'https://github.com/sohee-lee7/Squire.git/': Failed to connect to github.com port 443 after 21086 ms: Couldn't connect to server
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! D:\IT_base\node16\node_cache\_logs\2023-09-15T16_58_57_162Z-debug.log
二、解決辦法?
方法一?
1.項目里面執(zhí)行這個?
解釋:這個配置的實際效果是,當(dāng)你使用
git clone
或其他 Git 命令時,如果 URL 使用了git://
協(xié)議,Git 將自動替換為https://
協(xié)議。這可以幫助確保你能夠順利地克隆 Git 存儲庫,即使你的網(wǎng)絡(luò)環(huán)境對git://
協(xié)議有限制。?
git config --global url."https://".insteadOf git://
?2.項目里面繼續(xù)執(zhí)行這個
解釋:安裝依賴項用國內(nèi)淘寶鏡像的會更快一點
npm install --registry=https://registry.npm.taobao.org
方法二
1.清除DNS緩存
ipconfig /flushdns
?2.再次下載依賴項
npm install
方法三
--legacy-peer-deps
標(biāo)志的作用是將 npm 切換回舊的 peer dependencies 處理模式,即允許安裝與當(dāng)前項目中已安裝的版本不匹配的 peer dependencies。這樣做可能會有一些潛在的風(fēng)險,因為依賴項之間的不匹配可能導(dǎo)致運(yùn)行時錯誤或其他問題。但在某些情況下,這個標(biāo)志可能有助于解決依賴項管理方面的問題,特別是當(dāng)你必須使用不兼容版本的包時。需要注意的是,
--legacy-peer-deps
應(yīng)該謹(jǐn)慎使用,最好只在了解潛在風(fēng)險的情況下使用,以確保項目的穩(wěn)定性和可靠性。在可能的情況下,推薦通過更新項目的依賴項來解決 peer dependencies 的問題,以確保使用兼容的版本。
npm install --legacy-peer-deps
?
方法四
通過運(yùn)行這個命令,你告訴 npm 在指定的自定義注冊表 URL(
https://registry.npmmirror.com
)上查找 Express 包,并將其安裝到你的項目中。這可以用來訪問定制的 npm 注冊表,以加快包的下載速度或確保從特定源獲取包。?
npm --registry https://registry.npmmirror.com install express
?
來評論區(qū)評論用哪一個方法解決的吧
原文鏈接:https://blog.csdn.net/m0_52861000/article/details/132913911
- 上一篇:沒有了
- 下一篇:沒有了
相關(guān)推薦
- 2022-10-04 Redis中Redisson紅鎖(Redlock)使用原理_Redis
- 2022-06-18 C語言?詳解字符串基礎(chǔ)_C 語言
- 2022-08-05 雪花算法工具類
- 2022-04-09 Python實現(xiàn)簡易的限流器介紹_python
- 2022-01-18 報錯:Error occurred when invoke the listener‘s inter
- 2022-10-07 python?中pass和match使用方法_python
- 2022-10-21 K8s解決主機(jī)重啟后kubelet無法自動啟動問題(推薦)_云其它
- 2022-07-13 Python中常用序列數(shù)據(jù)結(jié)構(gòu)
- 欄目分類
-
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細(xì)win安裝深度學(xué)習(xí)環(huán)境2025年最新版(
- Linux 中運(yùn)行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎(chǔ)操作-- 運(yùn)算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認(rèn)證信息的處理
- Spring Security之認(rèn)證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權(quán)
- redisson分布式鎖中waittime的設(shè)
- maven:解決release錯誤:Artif
- restTemplate使用總結(jié)
- Spring Security之安全異常處理
- MybatisPlus優(yōu)雅實現(xiàn)加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務(wù)發(fā)現(xiàn)-Nac
- Spring Security之基于HttpR
- Redis 底層數(shù)據(jù)結(jié)構(gòu)-簡單動態(tài)字符串(SD
- arthas操作spring被代理目標(biāo)對象命令
- Spring中的單例模式應(yīng)用詳解
- 聊聊消息隊列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠(yuǎn)程分支