当前位置:网站首页>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
欢迎访问:天问博客
边栏推荐
- (视频+图文)机器学习入门系列-第5章 机器学习实践
- Taiyuan bus route crawling
- Qt/PyQt 窗口类型与窗口标志
- Solving linear programming problems based on MATLAB
- Mysql rownum 实现
- Compare three clock circuit schemes of single chip microcomputer
- Ws2812b color lamp driver based on f407zgt6
- Dp4301-sub-1g highly integrated wireless transceiver chip
- Detailed explanation of two modes of FTP
- Eps32+platform+arduino running lantern
猜你喜欢
An optimal buffer management scheme with dynamic thresholds paper summary
Arduino uno error analysis avrdude: stk500_ recv(): programmer is not responding
[paper reading | cryoelectron microscope] interpretation of the new subtomogram averaging method in relion 4.0
Cyberpunk special effect shader
Inclination monitoring solution of Internet of things
(Video + graphic) machine learning introduction series - Chapter 5 machine learning practice
[beauty of software engineering - column notes] "one question and one answer" issue 2 | 30 common software development problem-solving strategies
华为无线设备配置利用WDS技术部署WLAN业务
Convert source package to RPM package
Cs4344 domestic substitute for dp4344 192K dual channel 24 bit DA converter
随机推荐
Intelligent shelf safety monitoring system
[beauty of software engineering - column notes] 24 | technical debt: continue to make do with it, or overthrow it and start over?
Low cost 2.4GHz wireless transceiver chip -- ci24r1
[密码学实验] 0x00 安装NTL库
Official tutorial redshift 01 basic theoretical knowledge and basic characteristics learning
Unity beginner 3 - enemy movement control and setting of blood loss area (2D)
125kHz wake-up function 2.4GHz single transmitter chip-si24r2h
【学术相关】为什么很多国内学者的AI的论文复现不了?
TCP——滑动窗口
阿里巴巴政委体系-第三章、阿里政委与文化对接
Unicode private use areas
Ue4/ue5 C disk enlargement processing
Simplefoc parameter adjustment 3-pid parameter setting strategy
torch.nn.functional.one_hot()
[beauty of software engineering - column notes] 22 | how to do a good job in technology selection for the project?
[cryoelectron microscope | paper reading] emclarity: software for high-resolution cryoelectron tomography and sub fault averaging
Exercise: store department information
Application of explosion-proof inclination sensor in safe operation of LNG
An optimal buffer management scheme with dynamic thresholds paper summary
Alibaba political commissar system - Chapter III, Alibaba political commissar and cultural docking