有Angular / Angular- cli和Node.js的兼容性列表吗?

我经常会遇到这样的问题,不得不把旧的Angular项目和已弃用的Angular依赖项一起启动。

因为我不寻常地运行最新的Node.js版本(至少LTS版本),我经常有这个问题,我不能让旧的项目运行。 我使用了一个节点版本管理器来解决这个问题,但我仍然经常遇到这样的问题:我不确定对于Angular版本x来说,使用哪个node .js版本是最好的

遗憾的是,正式发布说明处理这个问题很糟糕,并不是一个真正的帮助,特别是如果你想知道你不能再使用哪个Angular版本的Node.js…

是否有一个完整的兼容性列表来检查哪个Angular版本与哪个Node.js版本兼容?

272708 次浏览
|Angular CLI|       Angular      |            NodeJS                            |TypeScript |              RxJS Version               |
|-----------|--------------------|------------------------------                |-----------|-----------------------------------------|
|-          |2.x                 |6.0.x or later minor                          |2.0.x      |5.0.x/5.1.x/5.2.x/5.3.x/5.4.x/5.5.x      |
|1.0.6      |4.x                 |6.9.x or later minor                          |2.2.x      |5.0.x/5.1.x/5.2.x/5.3.x/5.4.x/5.5.x      |
|1.1.3      |4.x                 |6.9.x or later minor                          |2.3.x      |5.0.x/5.1.x/5.2.x/5.3.x/5.4.x/5.5.x      |
|1.2.7      |4.x                 |6.9.x or later minor                          |2.3.x      |5.0.x/5.1.x/5.2.x/5.3.x/5.4.x/5.5.x      |
|1.3.2      |4.2.x or later minor|6.9.x or later minor                          |2.4.x      |5.0.x/5.1.x/5.2.x/5.3.x/5.4.x/5.5.x      |
|1.4.10     |4.2.x or later minor|6.9.x/8.9.x or later minor                    |2.4.x      |5.0.x/5.1.x/5.2.x/5.3.x/5.4.x/5.5.x      |
|(1.5.6)    |5.0.x               |6.9.x/8.9.x or later minor                    |2.4.x      |5.5.x                                    |
|1.5.6      |5.1.x               |6.9.x/8.9.x or later minor                    |2.5.x      |5.5.x                                    |
|1.6.7      |5.2.x or later minor|6.9.x/8.9.x or later minor                    |2.5.x      |5.5.x                                    |
|1.7.4      |5.2.x or later minor|6.9.x/8.9.x or later minor                    |2.5.x      |5.5.x                                    |
|6.0.8      |6.0.x               |8.9.x or later minor                          |2.7.x      |6.0.x/6.1.x/6.2.x/6.3.x/6.4.x/6.5.x/6.6.x|
|6.1.5      |6.1.x               |8.9.x or later minor                          |2.7.x      |6.2.x/6.3.x/6.4.x/6.5.x/6.6.x            |
|6.2.9      |6.1.x               |8.9.x or later minor                          |2.9.x      |6.2.x/6.3.x/6.4.x/6.5.x/6.6.x            |
|7.0.7      |7.0.x               |8.9.x/10.9.x or later minor                   |3.1.x      |6.3.x/6.4.x/6.5.x/6.6.x                  |
|7.1.4      |7.1.x               |8.9.x/10.9.x or later minor                   |3.1.x      |6.3.x/6.4.x/6.5.x/6.6.x                  |
|7.2.4      |7.2.x               |8.9.x/10.9.x or later minor                   |3.2.x      |6.3.x/6.4.x/6.5.x/6.6.x                  |
|7.3.9      |7.2.x               |8.9.x/10.9.x or later minor                   |3.2.x      |6.3.x/6.4.x/6.5.x/6.6.x                  |
|8.0.6      |8.0.x               |10.9.x or later minor                         |3.4.x      |6.4.x/6.5.x/6.6.x                        |
|8.1.3      |8.1.x               |10.9.x or later minor                         |3.4.x      |6.4.x/6.5.x/6.6.x                        |
|8.2.2      |8.2.x               |10.9.x or later minor                         |3.4.x      |6.4.x/6.5.x/6.6.x                        |
|8.3.25     |8.2.x               |10.9.x or later minor                         |3.5.x      |6.4.x/6.5.x/6.6.x                        |
|9.0.7      |9.0.7               |10.13.x/12.11.x or later minor                |3.6.x/3.7.x|6.5.x/6.6.x                              |
|9.x        |9.x                 |10.13.x/12.11.x or later minor                |3.6.x-3.8.x|6.5.x/6.6.x                              |
|10.x       |10.x                |10.13.x/12.11.x or later minor                |3.9.x      |6.5.x/6.6.x                              |
|10.1.x     |10.1.x              |10.13.x/12.11.x or later minor                |3.9.x/4.0.x|6.6.x                                    |
|10.2.x     |10.2.x              |10.13.x/12.11.x or later minor                |3.9.x/4.0.x|6.6.x                                    |
|11.0.7     |11.0.x              |10.13.x/12.11.x or later minor                |4.0.x      |6.6.x                                    |
|11.1.x     |11.1.x              |10.13.x/12.11.x or later minor                |4.0.x/4.1.x|6.6.x                                    |
|11.2.x     |11.2.x              |10.13.x/12.11.x or later minor                |4.0.x/4.1.x|6.6.x                                    |
|12.0.x     |12.0.x              |12.14.x/14.15.x or later minor                |4.2.x      |6.6.x                                    |
|12.1.x     |12.1.x              |12.14.x/14.15.x or later minor                |4.2.x/4.3.x|6.6.x                                    |
|12.2.x     |12.2.x              |12.14.x/14.15.x or later minor                |4.2.x/4.3.x|6.6.x/7.0.x or later minor version       |
|13.0.x     |13.0.x              |12.20.x/14.15.x/16.10.x or later minor version|4.4.x      |6.6.x/7.4.x or later minor version       |
|13.1.x     |13.1.x              |12.20.x/14.15.x/16.10.x or later minor version|4.4.x/4.5.x|6.6.x/7.4.x or later minor version       |
|13.2.x     |13.2.x              |12.20.x/14.15.x/16.10.x or later minor version|4.4.x/4.5.x|6.6.x/7.4.x or later minor version       |
|13.3.x     |13.3.x              |12.20.x/14.15.x/16.10.x or later minor version|4.4.x/4.7.x|6.6.x/7.4.x or later minor version       |
|14.0.x     |14.0.x              |14.15.x/16.10.x or later minor version        |4.6.x/4.8.x|6.6.x/7.4.x or later minor version       |
|14.1.x     |14.1.x              |14.15.x/16.10.x or later minor version        |4.6.x/4.8.x|6.6.x/7.4.x or later minor version       |
|14.2.x     |14.2.x              |14.15.x/16.10.x or later minor version        |4.6.x/4.9.x|6.6.x/7.4.x or later minor version       |
|15.0.x     |15.0.x              |14.20.x/16.13.x/18.10.x or later minor version|4.8.x      |6.6.x/7.4.x or later minor version       |
|-----------|--------------------|----------------------------------------------|-----------|-----------------------------------------|

裁判:https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3

我承认这实际上并没有回答你的问题。但它确实为当前版本提供了一些相关信息(这是我来这里的原因)。

下面是Angular当前版本的官方说法:

< a href = " https://angular。io /指导/ setup-local noreferrer“rel = > https://angular.io/guide/setup-local < / >

"Angular需要LTS的当前、活动或维护版本 node . js !”< / p >

在注释中,您将看到一个包的链接。Json文件,包含“引擎”;部分。对于Angular 11,它说:

  "engines": {
"node": ">= 10.13.0",
"npm": ">= 6.11.0",
"yarn": ">= 1.13.0"
},

可以查看package的发布版本。在GitHub的json和确定引擎。节点设置?

我也有类似的问题。我卸载了angular cli,并重新安装了以前的版本几次,直到达到angular cli v9,但当我试图运行“ionic serve”;我还是得到了同样的消息:“Angular CLI要求Node.js的最低版本为v14.15或16.10”。我现在有Angular CLU v9和node v12.20.0(我不能安装更高版本的node.js,因为我的旧笔记本上有windows 7,我不能买新的)。