node-cpulimit icon indicating copy to clipboard operation
node-cpulimit copied to clipboard

childProcess is not defined

Open ncd opened this issue 7 years ago • 3 comments

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.

ncd avatar Oct 12 '17 03:10 ncd

Adding this to the file var childProcess = require('child_process') solves it

lucas-janon avatar Apr 30 '18 18:04 lucas-janon

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 :)

deanrather avatar Sep 14 '18 03:09 deanrather

@vangelov🔔 I'm suffering under the same issue. I would really appreciate it if you publish the fixed version to npm!

dolsup avatar Jan 09 '19 08:01 dolsup