npm使用预发布版本进行安装(npm install using pre

编程入门 行业动态 更新时间:2024-10-09 03:30:45
npm使用预发布版本进行安装(npm install using pre-release versions)

我想在我的package.json中使用预发布版本来获取最新版本(包含als预发行版)中的一些依赖关系,但由于某些原因,它不适用于我的情况。 预发布完全被忽略。 作为一个例子让我们使用角度。 如果我问"angular": ">=1.4.0-rc.0 <1.4.1"作为依赖关系,我期望我能得到安装的版本1.4.0-rc.2 ,但我只得到版本1.4.0 。

npm info angular显示,有一些rc版本可用

... '1.4.0-beta.4', '1.4.0-beta.5', '1.4.0-beta.6', '1.4.0-rc.0', '1.4.0-RC.1', '1.4.0-rc.2',

我的package.json看起来如下

"dependencies": { "angular": ">=1.4.0-rc.0 <1.4.1" }

任何想法,为什么我没有得到任何RC版本? 我必须做些什么才能使它工作?

i want to use pre-release versions in my package.json to get some dependencies in the latest version (containing als pre-releases) but for some reasons it doesn't work in my case. The pre-releases are fully ignored. As an example lets use angular. If I ask "angular": ">=1.4.0-rc.0 <1.4.1" as an dependency, i would expect that i would get the version 1.4.0-rc.2 installed, but i get just the version 1.4.0.

The npm info angular shows, that there are some rc versions available like

... '1.4.0-beta.4', '1.4.0-beta.5', '1.4.0-beta.6', '1.4.0-rc.0', '1.4.0-rc.1', '1.4.0-rc.2',

My package.json looks as follows right now

"dependencies": { "angular": ">=1.4.0-rc.0 <1.4.1" }

Any ideas why i dont get any rc versions? What do i have to do to get it working?

最满意答案

这似乎是合乎逻辑的,版本的顺序通常如下(对于角色版本1.4.x):

1.4.0-beta.0 1.4.0-beta.2 1.4.0-beta.3 1.4.0-beta.4 1.4.0-beta.5 1.4.0-beta.6 1.4.0-rc.0 1.4.0-RC.1 1.4.0-rc.2 1.4.0 1.4.1

如果你要求"angular": ">=1.4.0-rc.0 <1.4.1" ,那么1.4.1不太严格的最新版本是1.4.0

无论如何,如果你需要"angular": ">=1.4.0-rc.0 <1.4.0" ,最新版本将是1.4.0-rc.2

This seems logical, the order of versions is normally the following (for angular releases 1.4.x):

1.4.0-beta.0 1.4.0-beta.2 1.4.0-beta.3 1.4.0-beta.4 1.4.0-beta.5 1.4.0-beta.6 1.4.0-rc.0 1.4.0-rc.1 1.4.0-rc.2 1.4.0 1.4.1

If you request "angular": ">=1.4.0-rc.0 <1.4.1", The latest version that is less strictly 1.4.1 is 1.4.0

Anyway, if you demand "angular": ">=1.4.0-rc.0 <1.4.0", the latest version will be 1.4.0-rc.2

更多推荐

本文发布于:2023-07-30 14:43:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1338811.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:版本   npm   pre   install

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!