title: TypeError: child_process_1.spawn is not a function
body: <p>I'm using Electron + React JS as frontend which in turn will communicate the backend program(Python). I've looked for solutions and came up with something called python-shell library. This library helps to communicate or call out the backend.</p>
  <p><strong>upload.js</strong></p>
  <pre><code>const handleSubmit = (e) =&gt; {
      e.preventDefault()
      console.log(file)
      var pyShell  = require('python-shell');
      
  
      let options = {
          mode: 'text',
          args: [file]
      };
      
      pyShell.PythonShell.run('./py/backend.py', (err, results) =&gt; {
          if (err) throw err;
          
          console.log('results: ', results);
          results.textContent = results[0];
      });
      
  }
  </code></pre>
  <p><strong>backend.py</strong></p>
  <pre><code>import sys
  print('Hello from Python!')
  sys.stdout.flush()
  </code></pre>
  <p>It shows me an error <strong>TypeError: child_process_1.spawn is not a function</strong>, and it shows the error location of index.ts(But there is no index.ts file in my entire directory).</p>