node-cpulimit
node-cpulimit copied to clipboard
childProcess is not defined
Hi, I got problem when using cpulimit. My options:
const options = {
limit: 95,
spawn: {
command: 'ffmpeg',
args: ['-y', '-f', 'concat', '-i', `"${indexPath}"`, '-c', 'copy', `"${outputVideoPath}"`]
}
}
Looks like this function got problem:
function findBySpawnOptions(options, callback) {
return childProcess.spawn(options.command, options.args, {
cwd: options.cwd
});
}
I'm not sure what is childProcess here.
Adding this to the file
var childProcess = require('child_process')
solves it
npm install cpulimit
installs v 1.1.4, which still has this issue.
I can see in the repo this is v1.1.3, where you've fixed the issue..
I think, somehow, you've pushed an older version tagged as a newer version or something..
either way -- the default behaviour is still broken. pls fix :)
@vangelov🔔 I'm suffering under the same issue. I would really appreciate it if you publish the fixed version to npm!