NPM and package.json weirdness
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- node.js
- Domain
- tooling
Research direction
Reproduce the package1 → package2 → package3 → helloworld dependency chain using the npm publish and npm update steps described in the issue. Inspect the generated package.json files and compare dependency versions before and after updating; done means the cause of the stale transitive version is documented or corrected and the update behavior is verified.
Written by the indexing model from the issue text.
Description
Something weird is going on with NPM and how package.json files work.
Suppose I have a package called package1 which is required by a package called package2, which in turn is required by package3 which is required by an app called helloworld, which only requires package3.
Okay, so I make a change to package1, npm publish the new version, and go to the directory that contains helloworld and npm update it.
You'd think that we'd get the new version of package1 but we don't. The only way to get it to update that I've discovered is to make a change to package3, publish it, and then npm update. But nothing changed in package3, why should I have to rebuild it just to get the change in package1 reflected in the app.
I have a feeling that this is because NPM modifies the package.json that NPM passes up the chain of require's? I swear this used to work, and what a pain in the ass if this is the only way to get changes deep in the stack reflected at the top.
- Dominant language
- HTML
- Stars
- 134
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from scripting/Scripting-News
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
scripting/Scripting-News#353 · 6 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
scripting/Scripting-News#332 · 25 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
scripting/Scripting-News#362 ·
-
Matt is moved aside Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
scripting/Scripting-News#361 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
scripting/Scripting-News#360 · 1 comment · 1 reaction ·
All issues in scripting/Scripting-News
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
use-agent-os/agent-os#3314 ·
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 85/100
githubnext/rig#534 ·
-
documentation low-priority templates
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
jesseray718/openroot#87 ·
-
factory-active factory-automatic task-bug-reproduction-cannot-reproduce task-identify-harness-labels-done task-identify-issue-type-done
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ReedClanton/NixOS#41 ·