image-lambda icon indicating copy to clipboard operation
image-lambda copied to clipboard

Reduce doesn't seem to work

Open ceccode opened this issue 9 years ago • 0 comments

Hi, if in the config.json file I leave the reduce section I get this error:

{
  "errorMessage": "spawn /var/task/node_modules/mozjpeg/vendor/cjpeg ENOENT",
  "errorType": "Error",
  "stackTrace": [
    "exports._errnoException (util.js:870:11)",
    "Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)",
    "onErrorNT (internal/child_process.js:344:16)",
    "nextTickCallbackWith2Args (node.js:437:9)",
    "process._tickDomainCallback (node.js:392:17)"
  ]
}

Example:

working config file:

{
  "resizes": [
    {
      "width": 100,
      "sourceDir": "images/uploads",
      "targetBucket": "example",
      "targetDir": "images/100w",
      "ACL": "public-read"
    },
    {
      "height": 200,
      "sourceDir": "images/uploads",
      "targetBucket": "example",
      "targetDir": "images/200h",
      "ACL": "public-read"
    }
  ]
}

not working config file:

{
  "reduce": {
    "sourceDir": "images/uploads",
    "targetBucket": "example",
    "targetDir": "images/reduce",
    "ACL": "public-read"
  },
  "resizes": [
    {
      "width": 100,
      "sourceDir": "images/uploads",
      "targetBucket": "example",
      "targetDir": "images/100w",
      "ACL": "public-read"
    },
    {
      "height": 200,
      "sourceDir": "images/uploads",
      "targetBucket": "example",
      "targetDir": "images/200h",
      "ACL": "public-read"
    }
  ]
}

Any ideas? Thanks

ceccode avatar Nov 17 '16 22:11 ceccode