From bc04136c678a7df33e4c51ec91d786096e52772f Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Thu, 19 Sep 2019 15:38:08 +0200 Subject: [PATCH] :zap: Make "n8n-node-dev build" work without n8n-modules in folder --- packages/node-dev/src/Build.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/node-dev/src/Build.ts b/packages/node-dev/src/Build.ts index b898ac05fd..ec8134256a 100644 --- a/packages/node-dev/src/Build.ts +++ b/packages/node-dev/src/Build.ts @@ -69,7 +69,9 @@ export async function buildFiles (options?: IBuildOptions): Promise { const outputDirectory = options.destinationFolder || UserSettings.getUserN8nFolderCustomExtensionPath(); - let buildCommand = `${tscPath} --p ${tsconfigData.path} --outDir ${outputDirectory} --rootDir ${process.cwd()}`; + // Supply a node base path so that it finds n8n-core and n8n-workflow + const nodeModulesPath = join(__dirname, '../../node_modules/'); + let buildCommand = `${tscPath} --p ${tsconfigData.path} --outDir ${outputDirectory} --rootDir ${process.cwd()} --baseUrl ${nodeModulesPath}`; if (options.watch === true) { buildCommand += ' --watch'; }