Hi!
I tried to follow steps listed in the page: https://github.com/graphcool/chromeless/tree/master/serverless#setup
but when I executed
npm run deploy
I get this error:
An error occurred: VersionLambdaFunction - Unzipped size must be smaller than 262144000 bytes.
I'm using:
npm --version
5.3.0
node --version
v6.6.0
git rev-parse HEAD
7d931568e6d64f7ab74c8e54ba205d6164c1d979
git remote -v
origin https://github.com/graphcool/chromeless.git (fetch)
origin https://github.com/graphcool/chromeless.git (push)
The generated files:
72M ./serverless/chromeless-serverless.zip
Here's a breakdown of the largest directories in the .zip:
187M .//node_modules/@serverless-chrome/lambda/dist
26M .//node_modules/typescript/lib
25M .//node_modules/aws-sdk
9.8M .//node_modules/aws-sdk/clients
8.2M .//node_modules/babel-runtime
8.2M .//node_modules/aws-sdk/dist
7.3M .//node_modules/babel-register
7.2M .//node_modules/babel-runtime/node_modules/core-js
7.2M .//node_modules/babel-register/node_modules/core-js
Are there any known workarounds for this issue yet? This is blocking my deployment of chromeless.
Using yarn instead of npm solved the issue for me :
yarn install inside the chromeless/serverless directory, thenyarn run deploy You obviously need yarn installed,
Yes even using npm.
I think that the last version of chromeless solves this issue.
Thanks!
Still have the problem , anyone can give some hints about how to solve it?
ok, I found the solution, deploy it with the ubuntu machine, do not know why, but it turns out to be

not 118MB again on my linux machine
Had the same problem, on OSX with npm install build produced 120MB zip, using yarn install helped - 70mb zip.
npm install also installs dev-dependencies as well, so might be better to run npm install --production to see if that trims out unnecessary packages. I'm not sure what yarn is doing differently to achieve bundle size differences?
@joelgriffith I have tried yarn on Mac OS, still face the same size problem. nom install --production should help
Most helpful comment
Are there any known workarounds for this issue yet? This is blocking my deployment of chromeless.