-
Notifications
You must be signed in to change notification settings - Fork 37
[BUG] bundledDependencies does not work in NPM workspaces subpackage #101
Copy link
Copy link
Open
Labels
Description
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
Reactions are currently unavailable