voxa icon indicating copy to clipboard operation
voxa copied to clipboard

100 MB in dependencies is way too much!

Open rmberrios opened this issue 5 years ago • 5 comments

Is there a way we can reduce the number of dependencies? actions-on-google has 49MB and googleapis has 44 MB.

This issue is really troublesome due to lambda size limit of 250 MB

rmberrios avatar Aug 05 '19 14:08 rmberrios

@rmberrios I'm running a project with these dependencies:

"dependencies": {
    "lambda-log": "^2.3.0",
    "lodash": "^4.17.15",
    "raven": "^2.6.4",
    "serverless-sentry-lib": "^1.1.2",
    "voxa": "^3.3.0"
  }

I'm using voxa: 3.3.0 and when I zip my code I get a 17.1 MB zipped file. I remember we had an issue when Voxa included samples and even the documentation files. That made a voxa project to have a really big size as you described, but it was fixed with this PR: https://github.com/VoxaAI/voxa/pull/218

Which solved the issue: https://github.com/VoxaAI/voxa/issues/217

omenocal avatar Aug 05 '19 23:08 omenocal

@omenocal See the folder without compression. Lambda size is based on the folder without compression.

rmberrios avatar Aug 06 '19 14:08 rmberrios

Oh ok, I misunderstood the maximum size of the zipped file which is 75MB in Lambda

omenocal avatar Aug 06 '19 16:08 omenocal

We should probably remove the botframework stuff, don't think anyone uses it and it's pretty outdated because of that. Also mark googleapis actions-on-google and ask-sdk-model as peer dependencies, those seem to be the biggest culprits of package cruft. Also, i've been thinking about actually splitting voxa to for example not require google stuff if you're just working with alexa and viceversa, however that seems like it would be a breaking change and lots of work to be honest

armonge avatar Oct 29 '19 08:10 armonge

Perhaps update with scoped dependencies? So only parts of Voxa can be imported if needed? https://stackoverflow.com/a/36667439

spatical avatar Dec 18 '19 07:12 spatical