mardi 6 juillet 2021

How to import node.js child_process to Ember Electron app?

I'm trying to convert a node.js app to Ember Electron app. In the node.js app I use:

  • const spawn = require('child_process').spawnSync;

but don't know how to import 'child_process' into Ember Electron app. Have tried:

  • import { child_process } from 'child_process'; // blows up: requireNode is not a function

and also:

  • import requireModule from 'ember-require-module';
  • const child_process = requireModule('child_process'); // does not find it

Maybe using node.js is a wrong approach in Ember Electron app? Any idea appreciated. Thanks.




Aucun commentaire:

Enregistrer un commentaire