ChatGPT解决这个技术问题 Extra ChatGPT

Is there a compatibility list for Angular / Angular-CLI and Node.js?

I periodically run into the problem, having to spin up old Angular projects with deprecated dependencies of Angular.

Because I unsually run the latest Node.js version (at least lates LTS version) I often had the problem, that I wasn't able to get the old projects running. I solved this by using a node version manager, but still I often have the problem that I'm not sure what is the best Node.js version to use for Angular Version X.

Sadly the official release notes handle this topic shabbily and are not a true help, especially if you like to know as of which Angular Version you can't use a specific Node.js version anymore...

Is there a complete compatibility list to check which Angular version is compatible with which Node.js version?

Are you reinstalling node modules each time?
No, I use a version manager to switch between Node.js versions. They remain installed, but through symlinks it is determined which version is currently used.

o
omostan
|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       |
|-----------|--------------------|----------------------------------------------|-----------|-----------------------------------------|

ref: https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3


I would have prefered an official resource, but I guess this is the best we can get for now (and it seems pretty complete and up to date), thus thank you.
Angular 11 should be compatible with LTS at the time. So it should work fine with 14.15.1. So far, in my testing, it does.
If you are here you might want to enable multiple versions of node. this is how on nubo.eu/Install-Multiple-Node-Versions-On-Windows (links for mac/linux are on the page, in case the page vanish here is the package: github.com/coreybutler/nvm-windows)
No unofficial resource for this? The Angular v11 => v12 upgrade guide only states You can no longer use Angular with Node.js version 10 or older. What a useless comment in relation to the unofficial documentation. I've tried Node v16 and it completely failed w/ Angular 12. If I buy software from the store I need to know if it runs on Windows. The box tells me. So why can't Google tell us this simple info?
for Angular 13.1.x also you can use 16.13.x or later minor version
j
jkyoutsey

I acknowledge that this does not actually answer your question. But it does provide some relevant information for current version (which is what brought me here).

Here is the official word from Angular on current version:

https://angular.io/guide/setup-local

"Angular requires a current, active LTS, or maintenance LTS version of Node.js."

In the notes you will see a link to a package.json file that contains an "engines" section. For Angular 11 it says:

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

It might be possible to look at the released version of package.json in GitHub and determine the engines.node setting?


Nice idea. A new Angular 13 project has 647 hits for engines within package-lock.json. However, I guess we're looking for the CLI's NodeJS compat here which is "node": "^12.20.0 || ^14.15.0 || >=16.10.0"