網(wǎng)站首頁 編程語言 正文
npm install報錯 Fix the upstream dependency conflict, or retrynpm ERR! this command with --forc
作者:Bunny0212 更新時間: 2024-03-15 編程語言npm install報錯 Fix the upstream dependency conflict, or retrynpm ERR! this command with --force or --legacy-peer-depsnpm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! Could not resolve dependency:
npm ERR! peer react-scripts@"^2.1.3" from craco-sass-resources-loader@1.1.0
npm ERR! node_modules/craco-sass-resources-loader
npm ERR! dev craco-sass-resources-loader@"^1.1.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react-scripts@2.1.8
npm ERR! node_modules/react-scripts
npm ERR! peer react-scripts@"^2.1.3" from craco-sass-resources-loader@1.1.0
npm ERR! node_modules/craco-sass-resources-loader
npm ERR! dev craco-sass-resources-loader@"^1.1.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
解決
這個問題解決方式有三種(我目前知道的),網(wǎng)上很多都說在npm install
后面加上--force
或者 --legacy-peer-deps
其實說的也對,但是如果每次元件這個問題都這么做的話難免很麻煩,而且不太像真正的解決問題。
使用這個命令,每次安裝時自動執(zhí)行,也就是默認選項為npm install legacy-peer-deps
這樣就好多了
npm set legacy-peer-deps=true
原文鏈接:https://blog.csdn.net/weixin_46533577/article/details/135598476
- 上一篇:沒有了
- 下一篇:沒有了
相關(guān)推薦
- 2021-12-12 【Groovy】集合遍歷 ( 使用集合的 eachWithIndex 方法進行遍歷 | 代碼示例 )
- 2023-02-01 docker中安裝elasticsarch?等鏡像的過程_docker
- 2022-11-08 uni.showToast和uni.navigateTo不能同時執(zhí)行 , 怎么解決
- 2022-07-21 Centos7修改主機名hostname
- 2022-04-28 深入淺出理解C語言指針的綜合應(yīng)用_C 語言
- 2023-04-01 react組件實例屬性state詳解_React
- 2023-10-15 獲取當天開始時間零點和結(jié)束時間24點的時間以及時間戳
- 2023-07-05 DateUtils 日期工具類
- 欄目分類
-
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細win安裝深度學習環(huán)境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎(chǔ)操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- 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被代理目標對象命令
- Spring中的單例模式應(yīng)用詳解
- 聊聊消息隊列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支