It seems if I use npm install --save <package_name>
, it installs the latest stable version.
看来如果我使用npm install --save
I want to install the absolutely latest release. So if I, for instance, want to install Bootstrap v4, I need to do npm install bootstrap@4.0.0-alpha.6
instead of just npm install bootstrap
.
我想安装最新版本。例如,如果我想安装Bootstrap v4,我需要执行npm install bootstrap@4.0.0-alpha.6而不是npm install bootstrap。
But if I didn't know that the latest version is named 4.0.0-alpha.6
, I wouldn't be able to install it. Is there a flag or something else I can use to make sure I get the latest version?
但如果我不知道最新版本名为4.0.0-alpha.6,我将无法安装它。有没有我可以用来确保获得最新版本的旗帜或其他东西?
2 个解决方案
#1
3
You need to use the @next keyword to get the latest alpha/beta releases of a package.
您需要使用@next关键字来获取软件包的最新alpha / beta版本。
In your case, it will be,
在你的情况下,它会,
npm install bootstrap@next --save
Hope this helps!
希望这可以帮助!
#2
1
Try:
尝试:
npm install bootstrap@next
This way you can install alpha/beta releases.
这样您就可以安装alpha / beta版本。
#1
3
You need to use the @next keyword to get the latest alpha/beta releases of a package.
您需要使用@next关键字来获取软件包的最新alpha / beta版本。
In your case, it will be,
在你的情况下,它会,
npm install bootstrap@next --save
Hope this helps!
希望这可以帮助!
#2
1
Try:
尝试:
npm install bootstrap@next
This way you can install alpha/beta releases.
这样您就可以安装alpha / beta版本。