npm / npm/cli

[BUG] `bundleDependencies: true` changed back into an array after `npm install --save`

Open
#6,498 1 comment 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Priority 2 Release 10.x Release 9.x
Dominant language
JavaScript
Stars
10.1k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
19

Description

Is there an existing issue for this?
  • I have searched the existing issues
This issue exists in the latest npm version
  • I am using the latest npm
Current Behavior

bundleDependencies gets normalized into an array when package.json is saved.

Expected Behavior

bundleDependencies remains true.

Steps To Reproduce
  1. Have bundleDependencies: true in your package.json
  2. npm install a new dependency
Environment
  • npm: 9.6.5
  • Node.js: 18.14.2
  • OS Name: macOS
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with a package.json containing bundleDependencies: true, then run npm install with a new dependency. Inspect how npm saves package.json and verify that bundleDependencies remains true rather than becoming an array.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.