gios / gzipper

CLI for compressing files.
https://www.npmjs.com/package/gzipper
GNU General Public License v3.0
68 stars 13 forks source link

AWS Lambda error #103

Open miguelwebtales opened 1 year ago

miguelwebtales commented 1 year ago

I am getting a error on running the code sample bellow on AWS lambda with node version 16. On local it's ok.

The gzipper version is the 7.2.0

const { Compress } = require('gzipper');
const gzip = new Compress('./src', './dist', {
  verbose: true,
  brotli: true,
  deflate: true,
});

try {
  const files = await gzip.run();
  console.info('Compressed files: ', files);
} catch (err) {
  console.error(err);
}

Error logs:

Error: Initiated Worker with invalid execArgv flags: --expose-gc, --max-semi-space-size=102, --max-old-space-size=1844
    at Compress.<anonymous> (/var/task/node_modules/gzipper/src/Compress.js:184:31)
    at step (/var/task/node_modules/gzipper/src/Compress.js:44:23)
    at Object.throw (/var/task/node_modules/gzipper/src/Compress.js:25:53)
    at rejected (/var/task/node_modules/gzipper/src/Compress.js:17:65)
gios commented 5 months ago

Hi @miguelwebtales , did you set some Node CLI arguments (execArgv) when you run gzipper?