Closed georgeneil closed 3 years ago
With the new Electron releases we cannot call Node.js modules directly from renderer process anymore, now you have to use the bridge file to communicate between renderer and main process.
I did a full refactor of the structure to include this option, take a look at 6acba3b654ee6a56ccd591a9fae157e957abd269.
In App.tsx ` const childProcess = require('child_process') const App = () => {
childProcess.exec('npm -v', (error, stdout, stderr) => { if (error) { alert('Error') return } alert(stdout.toString()) })
return ( <>
</> ) }
`
Working fine in Development mode. But getting 'Error' alert while running the packaged output ?