Skip to content

Maintenance: Remove @types/node from Lambda Layers #1171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 2 tasks
dreamorosi opened this issue Nov 17, 2022 · 1 comment · Fixed by #1181
Closed
1 of 2 tasks

Maintenance: Remove @types/node from Lambda Layers #1171

dreamorosi opened this issue Nov 17, 2022 · 1 comment · Fixed by #1181
Assignees
Labels
automation This item relates to automation completed This item is complete and has been merged/shipped discussing The issue needs to be discussed, elaborated, or refined

Comments

@dreamorosi
Copy link
Contributor

Summary

Discussed in #1170

Originally posted by Muthuveerappanv November 16, 2022

Layers when unzipped (6.0M)

The @types directory occupies 3.6M in the layers data, Since @types aren't used at runtime, they can be readily removed
Screen Shot 2022-11-16 at 12 25 00 PM

Without @types (2.4 M)

Screen Shot 2022-11-16 at 4 59 59 PM

I did rm -rf node_modules/@types

Using tools like node-prune

I have had much success with using node-prune as well, it takes away unused, files and reduces the size of node_modules by a good number, but has to be thoroughly tested.

image

Why is this needed?

Currently the Lambda layers are bundling what it appears to be @types/node which is 3.6MB:
image

image

Given that this is a devDependency it probably shouldn't be bundled there in the first place.

Which area does this relate to?

Other

Solution

No response

Acknowledgment

@dreamorosi dreamorosi added the triage This item has not been triaged by a maintainer, please wait label Nov 17, 2022
@dreamorosi dreamorosi added confirmed The scope is clear, ready for implementation discussing The issue needs to be discussed, elaborated, or refined automation This item relates to automation and removed triage This item has not been triaged by a maintainer, please wait confirmed The scope is clear, ready for implementation labels Nov 17, 2022
@dreamorosi dreamorosi linked a pull request Nov 23, 2022 that will close this issue
13 tasks
Repository owner moved this from Backlog to Coming soon in AWS Lambda Powertools for TypeScript Nov 23, 2022
@github-actions
Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@github-actions github-actions bot added the pending-release This item has been merged and will be released soon label Nov 23, 2022
@dreamorosi dreamorosi added completed This item is complete and has been merged/shipped and removed pending-release This item has been merged and will be released soon labels Jan 13, 2023
@dreamorosi dreamorosi moved this from Coming soon to Shipped in AWS Lambda Powertools for TypeScript Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation This item relates to automation completed This item is complete and has been merged/shipped discussing The issue needs to be discussed, elaborated, or refined
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants