在 package.json 中的包版本之前为假

False before version of the package in package.json

我正在使用 Yarn 安装我的包。最近我发现当我安装一些包时,例如,最新版本的 React(16.8.2),在 package.json(在依赖项部分)出现 false 就在版本号,像这样:

"react": "false16.8.2",

为什么会这样?

检查 .yarnrc 中的配置并扫描 'save-prefix' 设置。

正确的设置应该是:

 'save-prefix': '^'

Yarn adds "false" as version range instead of default ^