Skip to content
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

cdktf npm package bundles dozens of additional packages #3177

Closed
1 task
pauldraper opened this issue Oct 6, 2023 · 3 comments
Closed
1 task

cdktf npm package bundles dozens of additional packages #3177

pauldraper opened this issue Oct 6, 2023 · 3 comments
Labels
bug Something isn't working upstream/jsii Pending upstream work on JSII

Comments

@pauldraper
Copy link

pauldraper commented Oct 6, 2023

Expected Behavior

The cdftf npm package does not have a node_modules directory.

Actual Behavior

The cdftf npm package does not has a node_modules directory with dozens packages.

Steps to Reproduce

curl https://registry.npmjs.org/cdktf/-/cdktf-0.18.2.tgz | tar t | grep node_modules

Versions

cdktf 0.18.2

Providers

No response

Gist

No response

Possible Solutions

No response

Workarounds

No response

Anything Else?

This happens because cdktf bundles dependencies with bundledDependencies. There isn't a good reason to do this.

Including dozen of other packages bloats the download and install size. Rather, these should be normal dependencies in package.json and allow the package manager to resolve+download+install them.

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@pauldraper pauldraper added bug Something isn't working new Un-triaged issue labels Oct 6, 2023
@pauldraper pauldraper changed the title cdktf package bundles dozens of additional packages cdktf npm package bundles dozens of additional packages Oct 6, 2023
@ansgarm
Copy link
Member

ansgarm commented Oct 6, 2023

Hi @pauldraper 👋

This is due to how JSII works currently: #2819 (comment)

@ansgarm ansgarm added upstream/jsii Pending upstream work on JSII waiting-on-answer and removed new Un-triaged issue labels Oct 6, 2023
@pauldraper
Copy link
Author

Okay I see that now. https://aws.github.io/jsii/user-guides/lib-author/configuration/#dependencies-that-are-not-jsii-modules

It seems that JSII is trying to use npm packages for non-npm environments.

It's a pseudo-package npm manager that consumes npm packages, but doesn't implement everything npm does.

Kinda weird, but I can complain to JSII.

Copy link
Contributor

github-actions bot commented Nov 6, 2023

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working upstream/jsii Pending upstream work on JSII
Projects
None yet
Development

No branches or pull requests

2 participants