简体   繁体   English

在package.json中的软件包版本之前为False

[英]False before version of the package in package.json

I'm using Yarn to install my packages. 我正在使用Yarn安装我的软件包。 Lately I discovered that when I install some package, for example, the latest version of React(16.8.2), in package.json (in dependencies section) appears false just before the version number, like that: 最近我发现,当我安装某些软件包时,例如, package.json (在“依赖项”部分)中的最新版本的React(16.8.2)在版本号之前显示为false ,如下所示:

"react": "false16.8.2",

Why does this happen? 为什么会这样?

Check your configs in .yarnrc and scan for the 'save-prefix' settings. 检查.yarnrc中的配置,然后扫描“保存前缀”设置。

The correct setting should be: 正确的设置应为:

 'save-prefix': '^'

Yarn adds "false" as version range instead of default ^ 纱添加“假”作为版本范围,而不是默认的^

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM