網站首頁 編程語言 正文
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.
解決
這個問題解決方式有三種(我目前知道的),網上很多都說在npm install
后面加上--force
或者 --legacy-peer-deps
其實說的也對,但是如果每次元件這個問題都這么做的話難免很麻煩,而且不太像真正的解決問題。
使用這個命令,每次安裝時自動執行,也就是默認選項為npm install legacy-peer-deps
這樣就好多了
npm set legacy-peer-deps=true
原文鏈接:https://blog.csdn.net/weixin_46533577/article/details/135598476
- 上一篇:沒有了
- 下一篇:沒有了
相關推薦
- 2023-07-04 Linux直接創建SSH無密碼連接
- 2022-07-14 Jquery+Ajax實現跨域訪問_jquery
- 2022-12-06 c++入門必學算法之快速冪思想及實現_C 語言
- 2022-08-20 C#使用對象序列化類庫MessasgePack_C#教程
- 2022-07-09 SAP Commerce Cloud 里的 Site API 調用方式講解
- 2022-12-14 Docker使用Bind9實現域名解析的思路詳解_docker
- 2022-07-01 Nginx的gzip指令使用小結_nginx
- 2022-08-22 Go語言學習之Switch語句的使用_Golang
- 欄目分類
-
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支