$ git clone [email protected]:prisma/graphql-yoga.git
$ cd graphql-yoga
$ yarn
$ du -sh node_modules
165M node_modules
$ du -sh node_modules/aws-lambda
30M node_modules/aws-sdk
The aws-sdk package is listed as a prod dependency but it is inexistent on src folder. As you can see from the script above, it takes a lot of disk space. How open are you guys into moving it into devDependencies? I can do the PR if you want.
Besides taking space, it became an issue when I discovered the AWS Lambda only allows unzipped bundles to be smaller than 250MB and aws-sdk is the biggest chunk of it. Source: https://docs.aws.amazon.com/lambda/latest/dg/limits.html (see 'AWS Lambda Deployment Limits' section).
Maybe I'm missing something, but experiencing this as an issue because aws-lambda is a dependency while @types/aws-lambda is a devDependency. So I'm getting this error when building my app:
node_modules/graphql-yoga/dist/types.d.ts(11,64): error TS7016: Could not find a declaration file for module 'aws-lambda'. '/usr/src/node_modules/aws-lambda/lib/main.js' implicitly has an 'any' type.
Due to inactivity of this issue we have marked it stale. It will be closed if no further activity occurs.
I think it should be a devDep as well
Due to inactivity of this issue we have marked it stale. It will be closed if no further activity occurs.
Hey :wave:, It seems like this issue has been inactive for some time. In need for maintaining clear overview of the issues concerning the latest version of graphql-yoga we'll close it.
Feel free to reopen it at any time if you believe we should futher discuss its content. :slightly_smiling_face:
Bump. This should be a dev dependency. Right now aws-sdk is about 40% of my application's package size (and this is not an application that even runs on aws infra).
Maybe I'm missing something, but experiencing this as an issue because aws-lambda is a dependency while @types/aws-lambda is a devDependency
@mponizil +1 on this, the dependencies should be switched - the @types/aws-lambda should be a prod dependency and aws-lambda should be a dev dependency.
This is already auto-closed, but just for everybody's reference: this is now fixed (see #576)
Most helpful comment
Maybe I'm missing something, but experiencing this as an issue because
aws-lambdais adependencywhile@types/aws-lambdais adevDependency. So I'm getting this error when building my app: