question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

move aws-sdk package into devDependencies

See original GitHub issue
$ git clone git@github.com: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).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
mponizilcommented, Oct 29, 2018

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.
1reaction
carbonrobotcommented, Jan 2, 2019

I think it should be a devDep as well

Read more comments on GitHub >

github_iconTop Results From Across the Web

move aws-sdk package into devDependencies · Issue #436
The aws-sdk package is listed as a prod dependency but it is inexistent on src folder. As you can see from the script...
Read more >
Managing dependencies - AWS Documentation
Dependencies for your AWS CDK app or library are managed using package management tools. These tools are commonly used with the programming language...
Read more >
node.js - Can aws-sdk be a development dependency when ...
Absolutely, the aws-sdk is available by default as an NPM dependency inside of the lambda containers so if you leave it as a...
Read more >
Lambda Node Optimization. Set aws-sdk as dev ... - Nataraj
AWS Dev Packages ... npm install uglify-es -g; Move out Large Non-js files ... Set aws-sdk as dev dependency (this is a huge...
Read more >
Configuration Options - Renovate Docs
Configuration Options¶. This document describes all the configuration options you may use in a Renovate configuration file. Any config you define applies to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found