From 6aaae1ef6c994eb18d3f6807dd3524451908e63f Mon Sep 17 00:00:00 2001 From: Rupenieks <32895755+Rupenieks@users.noreply.github.com> Date: Sun, 6 Sep 2020 21:48:14 +0200 Subject: [PATCH] :bug: Typescript tsc could not be located when building node in Node-Dev (#918) * :zap: Added variation of Typescript executable path based on OS of user * :zap: indentation fix (removed spaces) --- packages/node-dev/src/Build.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/node-dev/src/Build.ts b/packages/node-dev/src/Build.ts index b631f46e45..ce2f16a263 100644 --- a/packages/node-dev/src/Build.ts +++ b/packages/node-dev/src/Build.ts @@ -63,8 +63,15 @@ export async function createCustomTsconfig () { export async function buildFiles (options?: IBuildOptions): Promise { options = options || {}; - // Get the path of the TypeScript cli of this project - const tscPath = join(__dirname, '../../node_modules/.bin/tsc'); + let typescriptPath; + + // Check for OS to designate correct tsc path + if (process.platform === 'win32') { + typescriptPath = '../../node_modules/TypeScript/lib/tsc'; + } else { + typescriptPath = '../../node_modules/.bin/tsc'; + } + const tscPath = join(__dirname, typescriptPath); const tsconfigData = await createCustomTsconfig();