Skip to content

@types/node is listed as a prod dependency, adds 2MB to package size (unnecessarily?) #2019

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

Open
ericallam opened this issue Aug 18, 2024 · 1 comment · May be fixed by #2030
Open

@types/node is listed as a prod dependency, adds 2MB to package size (unnecessarily?) #2019

ericallam opened this issue Aug 18, 2024 · 1 comment · May be fixed by #2030

Comments

@ericallam
Copy link

protobuf.js version: 7.3.3

@types/node should be listed as a devDependency. Here's the output of npmgraph showing the size of @types/node:

CleanShot 2024-08-18 at 21 53 32@2x

xPaw added a commit to xPaw/protobuf.js that referenced this issue Sep 17, 2024
@xPaw xPaw linked a pull request Sep 17, 2024 that will close this issue
@LinusU
Copy link

LinusU commented Apr 30, 2025

ping @mkruskal-google @sofisl

Is there any plans on resolving this? 🙏

I think that including a dependency on the Node.js typings isn't best practice, as then basically every library with typings on Npm would depend on that package, and instead it would be preferable if the end developers can add their own @types/node as a dev-dependency in their own projects.

This is currently causing us some issue when adding @valkey/valkey-glide (a native dependency that thus cannot be bundled) to our Lambda 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants