From 9bd8e17b8c522b893fbb031a7a989df8343e4dce Mon Sep 17 00:00:00 2001 From: Ian Lavery Date: Mon, 19 Aug 2024 12:19:29 -0700 Subject: [PATCH] fix web launch scripts --- demo/angular/scripts/run_demo.js | 3 ++- demo/react-native/scripts/run_demo.js | 3 ++- demo/react/scripts/run_demo.js | 3 ++- demo/vue/scripts/run_demo.js | 3 ++- demo/web/scripts/run_demo.js | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/demo/angular/scripts/run_demo.js b/demo/angular/scripts/run_demo.js index 63dd5c06..b0ddf917 100644 --- a/demo/angular/scripts/run_demo.js +++ b/demo/angular/scripts/run_demo.js @@ -96,6 +96,7 @@ fs.writeFileSync( const command = (process.platform === "win32") ? "npx.cmd" : "npx"; -child_process.fork("ng", commands, { +child_process.spawn("ng", commands, { execPath: command, + shell: true }); diff --git a/demo/react-native/scripts/run_demo.js b/demo/react-native/scripts/run_demo.js index d936e79f..65c3831b 100644 --- a/demo/react-native/scripts/run_demo.js +++ b/demo/react-native/scripts/run_demo.js @@ -92,6 +92,7 @@ fs.writeFileSync( const command = process.platform === 'win32' ? 'npx.cmd' : 'npx'; -child_process.fork('react-native', commands, { +child_process.spawn('react-native', commands, { execPath: command, + shell: true }); diff --git a/demo/react/scripts/run_demo.js b/demo/react/scripts/run_demo.js index 4bfbfb9a..31b3b763 100644 --- a/demo/react/scripts/run_demo.js +++ b/demo/react/scripts/run_demo.js @@ -95,6 +95,7 @@ fs.writeFileSync( const command = (process.platform === "win32") ? "npx.cmd" : "npx"; -child_process.fork("react-scripts", commands, { +child_process.spawn("react-scripts", commands, { execPath: command, + shell: true }); diff --git a/demo/vue/scripts/run_demo.js b/demo/vue/scripts/run_demo.js index da05feee..dc94b3d9 100644 --- a/demo/vue/scripts/run_demo.js +++ b/demo/vue/scripts/run_demo.js @@ -92,6 +92,7 @@ export default rhinoModel; const command = (process.platform === "win32") ? "npx.cmd" : "npx"; -child_process.fork("vite", commands, { +child_process.spawn("vite", commands, { execPath: command, + shell: true }); diff --git a/demo/web/scripts/run_demo.js b/demo/web/scripts/run_demo.js index 10b37eac..574b66bb 100644 --- a/demo/web/scripts/run_demo.js +++ b/demo/web/scripts/run_demo.js @@ -101,6 +101,7 @@ fs.writeFileSync( const command = (process.platform === "win32") ? "npx.cmd" : "npx"; -child_process.fork("http-server", ["-a", "localhost", "-p", "5000"], { +child_process.spawn("http-server", ["-a", "localhost", "-p", "5000"], { execPath: command, + shell: true });