fix(@angular/cli): ensure odd number Node.js version message is a warning

Fixes: #20050
This commit is contained in:
Charles Lyding 2021-02-12 21:35:15 -05:00 committed by Filipe Silva
parent 1f83f305db
commit b179a70482

View File

@ -24,12 +24,15 @@ if (version[0] % 2 === 1 && version[0] > 14) {
'Odd numbered Node.js versions will not enter LTS status and should not be used for production.' +
' For more information, please see https://nodejs.org/en/about/releases/.',
);
require('../lib/init');
} else if (
version[0] < 12 ||
version[0] === 13 ||
(version[0] === 12 && version[1] < 13) ||
(version[0] === 14 && version[1] < 15)
) {
// Error and exit if less than 12.13 or 13.x or less than 14.15
console.error(
'Node.js version ' +
process.version +