I have written below code to execute powershell script from typescipt page. I can read the script output at run time using node.js But when I use the same code in react framework app (client side typescript) page, I'm getting error in browser console.
spawn is not a function
var spawn = require("child_process").spawn;
spawn("powershell.exe",[".\download-packages-license.ps1"]);
How to execute powershellscript at run time from the client side typescript react app?