From f83c233bae3df0739a4c752ca2e60a08f9c80049 Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Fri, 31 May 2019 18:26:36 +0300 Subject: [PATCH] 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. --- lib/common/verify-node-version.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/verify-node-version.ts b/lib/common/verify-node-version.ts index 7e14722c55..abb07d0795 100644 --- a/lib/common/verify-node-version.ts +++ b/lib/common/verify-node-version.ts @@ -49,7 +49,7 @@ export function verifyNodeVersion(): void { var nodeWarning = getNodeWarning(); if (nodeWarning && nodeWarning.message) { - console.warn((`${os.EOL}${nodeWarning.message}${os.EOL}`).yellow.bold); + console.warn((os.EOL + nodeWarning.message + os.EOL).yellow.bold); } }