sambaiz / puppeteer-lambda-starter-kit

Starter Kit for running Headless-Chrome by Puppeteer on AWS Lambda.
MIT License
580 stars 82 forks source link

Update npm-scripts to support Windows #31

Open lucianweber opened 6 years ago

lucianweber commented 6 years ago

This pull-request removes all Unix-specific commands from the NPM-scripts and replace them with cross-platform commands, thereby allowing this project to built on Windows.

I have tested these changes on Windows and they produce a package.zip. Since I currently do not have access to a Unix-system I can neither verify if the changes also altered the behaviour nor if this is still working on Unix, so this should be tested before merging.

Fixes #6 and fixes #14.

Anasbzr commented 6 years ago

I have deployed this package over to lambda and I get the following error!

(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Failed to launch chrome! spawn /tmp/headless_shell ENOENT

I had chrome working when deploying from a unix based system.

Based on unix, the Lambda's size is 42mb, Windows is 12mb