We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I use example code on Electron main thread but get back error Uncaught Exception: TypeError: Sudoer is not a constructor
const {Sudoer} = require('electron-sudo') let options = {name: 'electron sudo application'}, sudoer = new Sudoer(options); /* Spawn subprocess behavior */ let cp = await sudoer.spawn( 'echo', ['$PARAM'], {env: {PARAM: 'VALUE'}} ); cp.on('close', () => { /* cp.output.stdout (Buffer) cp.output.stderr (Buffer) */ });
Please help figure out where is problem. thanks
The text was updated successfully, but these errors were encountered:
require('electron-sudo').default
Sorry, something went wrong.
I had to use
const Sudoer = require("electron-sudo").default
There was nothing to unpack when using const { Sudoer } = ...
const { Sudoer } = ...
No branches or pull requests
I use example code on Electron main thread but get back error
Uncaught Exception: TypeError: Sudoer is not a constructor
Please help figure out where is problem. thanks
The text was updated successfully, but these errors were encountered: