简体   繁体   English

NPM 依赖版本标记为 *

[英]NPM dependency version marked as *

I have inherited a codebase, and it has these deps listed:我继承了一个代码库,它列出了这些 deps:

"peerDependencies": {
    "react": "*",
    "react-dom": "*",
    "react-intl": "*",
    "react-redux": "*",

Am I correct that this means "grab the latest version of the package" when npm install is run?npm install运行时,这意味着“获取最新版本的软件包”,我是否正确? (What about beta and alpha releases?) (beta 和 alpha 版本怎么样?)

Yes, changing the version to '*' will install the latest with npm install --save and if already installed you can run npm update --save to update to the latest version.是的,将版本更改为“*”将使用npm install --save安装最新版本,如果已经安装,您可以运行npm update --save更新到最新版本。

The version must be parseable by node-semver, which is a dependency of npm.该版本必须可由 node-semver 解析,这是 npm 的一个依赖项。 More on version syntax can be found here: https://docs.npmjs.com/misc/semver可以在此处找到有关版本语法的更多信息: https : //docs.npmjs.com/misc/semver

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

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