diff --git a/demo/react-native/scripts/run_demo.js b/demo/react-native/scripts/run_demo.js index ec9626ff..59e9231c 100644 --- a/demo/react-native/scripts/run_demo.js +++ b/demo/react-native/scripts/run_demo.js @@ -63,6 +63,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 90b9a563..a4f9c8cf 100644 --- a/demo/react/scripts/run_demo.js +++ b/demo/react/scripts/run_demo.js @@ -62,6 +62,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/web/scripts/run_demo.js b/demo/web/scripts/run_demo.js index 8ef4096a..cdf2ab49 100644 --- a/demo/web/scripts/run_demo.js +++ b/demo/web/scripts/run_demo.js @@ -58,6 +58,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 });