当前位置:网站首页>pnpm install出现:ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies
pnpm install出现:ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies
2022-07-29 08:11:00 【Bejpse】
使用 pnpm install 安装项目依赖时出现:ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies,在 pnpm github issues 中找到相关解决方案。

一、前言
完整日志
ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies
.
└─┬ koa-views
└─┬ consolidate
└── ? unmet peer [email protected]^16.13.1: found 18.1.0hint: If you don’t want pnpm to fail on peer dependency issues, set the “strict-peer-dependencies” setting to “false”.
问题原因:在 npm 3 中,不会再强制安装
peerDependencies(对等依赖)中所指定的包,而是通过警告的方式来提示我们。pnpm 会在全局缓存已经下载过的依赖包,如果全局缓存的依赖版本与项目package.json中指定的版本不一致,就会出现这种hint警告。pnpm团队成员给出的解答:
There are two types of peer deps: optional peer dependencies and non-optional ones. The warnings are only printed for non-optional peer dependencies. If a package works without the peer dependencies, then it should be declared as optional peer dependency. Optional peer dependencies are supported by npm/yarn/pnpm for a long time.
二、处理方案
在项目的
package.json中配置peerDependencyRules忽略对应的警告提示:{
“pnpm”: {
“peerDependencyRules”: {
“ignoreMissing”: [
“react”
]
}
}
}在
.npmrc配置文件中添加strict-peer-dependencies=false,这意味着将关闭严格的对等依赖模式。操作命令如下:npm config set strict-peer-dependencies=false
参考链接:
- https://github.com/pnpm/pnpm/issues/4684
欢迎访问:天问博客
边栏推荐
- Product promotion channels and strategies, cosmetics brand promotion methods and steps
- Simplefoc parameter adjustment 3-pid parameter setting strategy
- [beauty of software engineering - column notes] 27 | what is the core competitiveness of software engineers? (top)
- C language problems
- Explanation and closing method of server 135, 137, 138, 139, 445 and other ports
- [lecture notes] how to do in-depth learning in poor data?
- How to draw an excellent architecture diagram
- 数仓分层设计及数据同步问题,,220728,,,,
- [note] the art of research (understand the importance of the problem)
- Unity shader learning (VI) achieving radar scanning effect
猜你喜欢

SQL 面试碰到的一个问题
![[experience] relevant configuration of remote connection to intranet server through springboard machine](/img/27/25301cce8a4e5fa0c91902c7b734fb.png)
[experience] relevant configuration of remote connection to intranet server through springboard machine
![[lecture notes] how to do in-depth learning in poor data?](/img/7d/5767c078600bd88b7d2146069f4f40.jpg)
[lecture notes] how to do in-depth learning in poor data?
![[cryoelectron microscope | paper reading] emclarity: software for high-resolution cryoelectron tomography and sub fault averaging](/img/1e/9f05862288261e16a6b04508b9b292.png)
[cryoelectron microscope | paper reading] emclarity: software for high-resolution cryoelectron tomography and sub fault averaging

Implementation of simple cubecap+fresnel shader in unity
![[beauty of software engineering - column notes] 22 | how to do a good job in technology selection for the project?](/img/1a/72bfb3fef59c54188a823ead3a5390.png)
[beauty of software engineering - column notes] 22 | how to do a good job in technology selection for the project?

How to connect VMware virtual machine to external network under physical machine win10 system

Simplefoc parameter adjustment 3-pid parameter setting strategy

Alibaba political commissar system - Chapter 4: political commissars are built on companies

(Video + graphic) machine learning introduction series - Chapter 5 machine learning practice
随机推荐
Solve the problem of MSVC2017 compiler with yellow exclamation mark in kits component of QT
Matrix decomposition and gradient descent
[cryptography experiment] 0x00 install NTL Library
Solve the problem that the disk is full due to large files
Privacy is more secure in the era of digital RMB
Dp1332e multi protocol highly integrated contactless read-write chip
简易计算器微信小程序项目源码
An Optimal Buffer Management Scheme with Dynamic Thresholds论文总结
阿里巴巴政委体系-第一章、政委建在连队上
Useful websites
[beauty of software engineering - column notes] 26 | continuous delivery: how to release new versions to the production environment at any time?
The difference between torch.tensor and torch.tensor
Some thoughts on growing into an architect
Ansible (automation software)
"Swiss Army Knife" -nc in network tools
Lora opens a new era of Internet of things -asr6500s, asr6501/6502, asr6505, asr6601
Low cost 2.4GHz wireless transceiver chip -- ci24r1
【NOI模拟赛】计算几何(凸包,暴力,并查集)
阿里巴巴政委体系-第三章、阿里政委与文化对接
Dynamically load data