1
1
// This function must be separate to avoid dependencies on C++ modules - it must execute precisely when other functions cannot
2
2
3
+ import { color } from "../color" ;
3
4
import { ISystemWarning } from "./declarations" ;
4
5
5
6
// Use only ES5 code here - pure JavaScript can be executed with any Node.js version (even 0.10, 0.12).
@@ -11,7 +12,7 @@ var util = require("util");
11
12
// These versions cannot be used with CLI due to bugs in the node itself.
12
13
// We are absolutely sure we cannot work with them, so inform the user if he is trying to use any of them and exit the process.
13
14
var versionsCausingFailure = [ "0.10.34" , "4.0.0" , "4.2.0" , "5.0.0" ] ;
14
- var minimumRequiredVersion = "22.12 .0" ;
15
+ var minimumRequiredVersion = "8.0 .0" ;
15
16
16
17
interface INodeVersionOpts {
17
18
supportedVersionsRange : string ;
@@ -45,13 +46,15 @@ export function verifyNodeVersion(): void {
45
46
semver . lt ( nodeVer , minimumRequiredVersion )
46
47
) {
47
48
console . error (
48
- util . format (
49
- "%sNode.js '%s' is not supported. To be able to work with %s CLI, install any Node.js version in the following range: %s.%s" ,
50
- os . EOL ,
51
- nodeVer ,
52
- cliName ,
53
- supportedVersionsRange ,
54
- os . EOL ,
49
+ color . red . bold (
50
+ util . format (
51
+ "%sNode.js '%s' is not supported. To be able to work with %s CLI, install any Node.js version in the following range: %s.%s" ,
52
+ os . EOL ,
53
+ nodeVer ,
54
+ cliName ,
55
+ supportedVersionsRange ,
56
+ os . EOL ,
57
+ ) ,
55
58
) ,
56
59
) ;
57
60
process . exit ( 1 ) ;
0 commit comments