368

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?

jowey
  • 7,581
  • 6
  • 27
  • 46
  • Are you reinstalling node modules each time? – Richard Dunn Feb 16 '20 at 13:46
  • 2
    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. – jowey Feb 17 '20 at 20:16
  • 1
    Just giving a comment to help search engines, if you have the error "npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve..." seems to happen because you installed latest nodeJs version for an old Angular version. This post helped me to fix Angular11 by installing node v12 (when latest node version is v16). – Yogurtu Aug 19 '22 at 02:08

5 Answers5

888

UPDATE:

One more way to get to this details is by running npx -y ngvm compat. Wondering what NGVM is? Check it out this video and github repo

Now since April 2023 angular docs provides a table of compatible versions

Angular CLI version Angular version Node.js version TypeScript version RxJS version
~16.1.0 ~16.1.0 ^16.13.0 || ^18.10.0 >=4.9.3 <5.2.0 ^6.5.5 || ^7.4.0
~16.0.0 ~16.0.0 ^16.13.0 || ^18.10.0 >=4.9.3 <5.1.0 ^6.5.5 || ^7.4.0
~15.2.0 ~15.2.0 ^14.20.0 || ^16.13.0 || ^18.10.0 >=4.8.4 <5.0.0 ^6.5.5 || ^7.4.0
~15.1.0 ~15.1.0, ^14.20.0 || ^16.13.0 || ^18.10.0 >=4.8.4 <5.0.0 ^6.5.5 || ^7.4.0
~15.0.5 ~15.0.4 ^14.20.0 || ^16.13.0 || ^18.10.0 ~4.8.4 ^6.5.5 || ^7.4.0
~15.0.0 ~15.0.0 ^14.20.0 || ^16.13.0 || ^18.10.0 ~4.8.4 ^6.5.5 || ^7.4.0
~14.2.0 ~14.2.0 ^14.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beta.30 ~2.3.1 ^6.9.5 ~2.0.10 ^5.0.3
1.0.0-beta.22-1 (package name: angular-cli) ~2.2.4 ^6.9.5 ~2.0.10 ^5.0.3
1.0.0-beta.20-1 (package name: angular-cli) ~2.1.2 ^6.9.5 ~2.0.10 ^5.0.3
1.0.0-beta.17 (package name: angular-cli) ~2.0.2 ^6.9.5 ~2.0.10 ^5.0.3

Credits: https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3 by Lars Gyrup Brink Nielsen

angularrocks.com
  • 26,767
  • 13
  • 87
  • 104
  • 52
    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. – jowey Feb 17 '20 at 20:27
  • 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. – jkyoutsey Nov 23 '20 at 21:17
  • 3
    If you are here you might want to enable multiple versions of node. this is how on https://www.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: https://github.com/coreybutler/nvm-windows) – JimiSweden Jun 23 '21 at 16:03
  • 2
    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? – P.Brian.Mackey Jan 10 '22 at 20:16
  • for Angular 13.1.x also you can use 16.13.x or later minor version – Hamid Taebi Jan 15 '22 at 10:12
  • 1
    How should the column 'Typescript' be read? It says '4.6.x/4.8.x' for Angular 14. But the link states >= 4.6.0 < 4.8.0, so shouldn't the column state '4.6.x/4.7.x' ? – TomStroemer Aug 17 '22 at 13:18
  • this helped me to solve the "npm ERR! code ERESOLVE - npm ERR! ERESOLVE could not resolve" issue, thanks. – Yogurtu Aug 19 '22 at 02:09
  • 8
    Props to the commity for keeping this "table" up to date! – El-Mo Nov 29 '22 at 03:30
  • What about AngularJS (Angular 1)? – MatterOfFact Jan 16 '23 at 12:04
  • @MatterOfFact AnuglarJS has being deprecated – angularrocks.com Jan 17 '23 at 03:29
  • @angularrocks.com I now this. But it is still in use in many projects. So I'm interested if there are limitations or recommendations regarding the node version used – MatterOfFact Jan 17 '23 at 07:00
  • What I need is the compatible versions of npm. I don't know why nobody seems to care about this, we don't use node directly when programming in Angular, we use npm to manage dependencies, and this is where most of the trouble comes from. – AsGoodAsItGets Feb 18 '23 at 19:53
  • Guys, any idea if it's possible to install `angular/cli:1.7.4` on `node 16` version, because I'm getting "gyp verb `which` failed Error: not found: python" exception. Even if I install python2, `g++` and `make` packages, I'm still getting `gyp ERR! stack Error: `make` failed with exit code: 2` install errors. Any idea how to get `angular/cli:1.7.4`on `node16` work ? – famas23 Mar 14 '23 at 10:41
  • @famas23 it is not possible, for `angular/cli:1.7.4` you need node `^6.9.5 || ^8.9.4`, as per table above. – angularrocks.com Mar 15 '23 at 04:49
  • Any hack to install the package, with nide 16 version ? – famas23 Mar 16 '23 at 20:25
  • 5
    There is now an official table with this: https://angular.io/guide/versions – Noel De Martin Apr 20 '23 at 10:43
27

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?

jkyoutsey
  • 1,969
  • 2
  • 20
  • 31
  • 5
    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"` – Ben Racicot Nov 04 '21 at 15:42
  • [Related discussion on Angular's Github repo](https://github.com/angular/angular/issues/42076). – ThCollignon Dec 07 '21 at 07:13
5

Official document by Angular - https://angular.io/guide/versions

They keep it updated and also have a separate list of unsupported versions.

Animesh Rawat
  • 197
  • 3
  • 9
1

I have a similar problem. I uninstalled angular cli and reinstaled a previous version several times, until reaching angular cli v9, but when I try to run "ionic serve" I still get the same message "The Angular CLI requires a minimum Node.js version of either v14.15 or 16.10". Always the same message though I now have Angular CLU v9 and node v12.20.0 (I can't install a higher version of node.js because I have windows 7 in an old notebook and I can't buy a new one).

1

You can use the Angular Update Guide to find the node version supported. This is official guide from Google.

Just pretend you are upgrading from a old version. For instance, if you are on Angular 15, set the guide to upgrade from 14 to 15 and it will let you know what node version you need.

example: enter image description here

dman
  • 10,406
  • 18
  • 102
  • 201