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

[BUG] bundledDependencies does not work in NPM workspaces subpackage #101

Open
1 task done
aloisklink opened this issue May 12, 2022 · 1 comment
Open
1 task done
Labels
Bug thing that needs fixing Priority 1 high priority issue

Comments

@aloisklink
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

bundledDependencies does not work when using NPM's new workspaces feature.

The node_modules folder is no longer in the subpackage, only in the root package, so the bundledDependencies field no longer works.

Expected Behavior

Running npm pack --workspaces should pack bundledDependencies stored in my subpackage's package.json file.

Steps To Reproduce

Create a new folder and run the following to generate a package.json and a subpackage/package.json file.

npm init -f && npm init -f -w subpackage

Then add the following lines to both package.json and subpackage/package.json:

"dependencies": {"tar": "*"},
"bundledDependencies": ["tar"],

Then, do an npm install && npm pack --workspaces. You should see that npm pack correctly has a === Bundled Dependencies === line, while npm pack --workspaces does not.

Environment

  • npm: 8.10.0
  • Node: v16.13.0
  • OS: Ubuntu 22.04
  • platform: Intel x86_64 processor: i7-1165G7
@aloisklink aloisklink added Bug thing that needs fixing Needs Triage needs an initial review labels May 12, 2022
@lukekarrys lukekarrys added Priority 1 high priority issue and removed Needs Triage needs an initial review labels Sep 23, 2022
@lukekarrys
Copy link
Contributor

It's possible this is the same root cause as npm/cli#5320. I'm linking these two issues so as we can look into both at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Priority 1 high priority issue
Projects
None yet
Development

No branches or pull requests

2 participants