Skip to content

Commit

Permalink
set min node version for hb-service
Browse files Browse the repository at this point in the history
  • Loading branch information
oznu committed Jul 10, 2022
1 parent cf8a61d commit 185aa34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ MS Internet Explorer (any version) is not supported!
While the Homebridge UI should work on Node.js 14+, only the following versions of Node.js are officially supported:

* node v14.15.0 or higher
* npm v6.4.1 or higher
* npm v6.14.8 or higher

You can check your current versions using these commands:

Expand Down
8 changes: 4 additions & 4 deletions src/bin/hb-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -615,12 +615,12 @@ export class HomebridgeServiceHelper {
}

/**
* Checks the current Node.js version is > 10
* Checks the current Node.js version is > 14
*/
private nodeVersionCheck() {
// 64 = v10;
if (parseInt(process.versions.modules, 10) < 64) {
this.logger(`ERROR: Node.js v10.13.0 or greater is required. Current: ${process.version}.`, 'fail');
// 83 = v14;
if (parseInt(process.versions.modules, 10) < 83) {
this.logger(`ERROR: Node.js v14.15.0 or greater is required. Current: ${process.version}.`, 'fail');
process.exit(1);
}
}
Expand Down

0 comments on commit 185aa34

Please sign in to comment.