Skip to content

Instantly share code, notes, and snippets.

@DServy
Created November 22, 2013 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DServy/ae625ec369691d5c9b24 to your computer and use it in GitHub Desktop.
Save DServy/ae625ec369691d5c9b24 to your computer and use it in GitHub Desktop.
Issue with child proccess
err Fri, 22 Nov 2013 22:08:30 GMT var r = this._handle.spawn(options);
^
err Fri, 22 Nov 2013 22:08:30 GMT TypeError: Bad argument
at ChildProcess.spawn (child_process.js:915:24)
at exports.spawn (child_process.js:715:9)
at /opt/run/snapshot/package/node_modules/express-cdn/lib/main.js:296:24
at /opt/run/snapshot/package/node_modules/express-cdn/lib/main.js:419:92
at ClientRequest.onResponse (/opt/run/snapshot/package/node_modules/express-cdn/node_modules/knox/lib/client.js:57:7)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1688:21)
at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:121:23)
at CleartextStream.socketOnData [as ondata] (http.js:1583:20)
at CleartextStream.read [as _read] (tls.js:507:12)
// Line of code in question
var spawn = require('child_process').spawn
var jpegtran = spawn(jpegtranPath, [ '-copy', 'none', '-optimize', '-outfile', jpg, jpg ]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment