Skip to content

Commit f83c233

Browse files
fix: incorrect error for non-supported Node.js version
In case you are using unsupported Node.js version CLI must show you error that this version is not supported and to inform you which is the supported range. Currently this is not working and CLI shows error for `Unexpected token`. The problem is that CLI has some specific logic to check the Node.js version and the code should be pure ES5 syntax in order to work with old Node.js versions (by default CLI's code is ES6). The current issue is caused by using string interpolation in the mentioned code. Fix the message to fix the problem.
1 parent e173c2d commit f83c233

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/common/verify-node-version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function verifyNodeVersion(): void {
4949

5050
var nodeWarning = getNodeWarning();
5151
if (nodeWarning && nodeWarning.message) {
52-
console.warn((`${os.EOL}${nodeWarning.message}${os.EOL}`).yellow.bold);
52+
console.warn((os.EOL + nodeWarning.message + os.EOL).yellow.bold);
5353
}
5454
}
5555

0 commit comments

Comments
 (0)