From 02765f8aad230761ad9377dea18415b69f96100b Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Thu, 5 Apr 2018 23:24:22 +0100 Subject: [PATCH] run by calling node-red script handles npm start better after both clone and npm pack --- red/runtime/storage/localfilesystem/projects/Project.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/red/runtime/storage/localfilesystem/projects/Project.js b/red/runtime/storage/localfilesystem/projects/Project.js index 11aa32564..a8b1df6f2 100644 --- a/red/runtime/storage/localfilesystem/projects/Project.js +++ b/red/runtime/storage/localfilesystem/projects/Project.js @@ -280,7 +280,7 @@ Project.prototype.update = function (user, data) { savePackage = true; this.package.dependencies = data.dependencies; if (this.package.dependencies.hasOwnProperty("node-red")) { - this.package.scripts = {"start":"node node_modules/node-red/red.js -u . " + this.package['node-red'].settings.flowFile}; + this.package.scripts = {"start":"node-red -u . " + this.package['node-red'].settings.flowFile}; } else { delete(this.package.scripts.start); } @@ -338,7 +338,7 @@ Project.prototype.update = function (user, data) { this.paths.flowFile = data.files.flow; this.package['node-red'].settings.flowFile = data.files.flow; if (this.package.dependencies.hasOwnProperty("node-red")) { - this.package.scripts = {"start":"node node_modules/node-red/red.js -u . " + data.files.flow}; + this.package.scripts = {"start":"node-red -u . " + data.files.flow}; } else { delete(this.package.scripts.start); }