diff --git a/demo/angular/scripts/run_demo.js b/demo/angular/scripts/run_demo.js index aeac74349..0f3a00b45 100644 --- a/demo/angular/scripts/run_demo.js +++ b/demo/angular/scripts/run_demo.js @@ -106,6 +106,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 5abb5d8a1..32b908e0c 100644 --- a/demo/react-native/scripts/run_demo.js +++ b/demo/react-native/scripts/run_demo.js @@ -95,6 +95,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 adcc29a4b..d6108389d 100644 --- a/demo/react/scripts/run_demo.js +++ b/demo/react/scripts/run_demo.js @@ -106,6 +106,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 335ff751d..7b9251a32 100644 --- a/demo/vue/scripts/run_demo.js +++ b/demo/vue/scripts/run_demo.js @@ -102,6 +102,7 @@ export default porcupineModel; 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 8ffdec9fb..07f1ba4e6 100644 --- a/demo/web/scripts/run_demo.js +++ b/demo/web/scripts/run_demo.js @@ -112,6 +112,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 });