Skip to content

Commit

Permalink
chore: update node version check
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Dec 10, 2021
1 parent dd96390 commit 473ea59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions generators/app/index.js
Expand Up @@ -39,8 +39,9 @@ class NgxGenerator extends Generator {
);
}

if (semver.lt(process.version, '10.9.0')) {
this.log(chalk.yellow('Angular CLI v8 needs NodeJS v10.9 or greater.'));
const minNodeVersion = pkg.engines.node.slice(2);
if (semver.lt(process.version, minNodeVersion)) {
this.log(chalk.yellow(`Angular CLI v13 needs NodeJS ${minNodeVersion} or greater.`));
this.log(chalk.yellow(`You are using ${process.version} which is unsupported, please upgrade.\n`));
// eslint-disable-next-line unicorn/no-process-exit
process.exit(-1);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -84,8 +84,8 @@
"xo": "^0.42.0"
},
"engines": {
"node": ">=12.14.1",
"npm": ">=5.2"
"node": ">=12.20.0",
"npm": ">=6"
},
"xo": {
"space": true,
Expand Down

0 comments on commit 473ea59

Please sign in to comment.