git modules updates within Dockerfile build #6106
Labels
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 8.x
work is associated with a specific npm 8 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
1
package.json
2
run
This would successfully install
pack@1.0.1
3
changing package.json to
4
run again
this would update correctly
package-lock.json
stillnode_modules
would still contain outdated package versionExpected Behavior
There's two confusions here
npm i
shouldn't update anything once module installed. Yet I've tried on regular (non a git) modules the version is updated correctly for the flow. And whypackage-lock.json
is updated for git modules anyway becoming diverged fromnode_modules
statee.g having one
once an image is built updating deps version in
package*
repeated build would have still updatedpackage*
instances but yet has as well outdated package version innode_modules
So for docker in this case
npm i
even shouldn't be like update on installed deps since mutation in layershould reject the previous state for next instruction so that
npm i
should be just as pure initial runand the behavior is not changing even for hucks like
so what might be a solution here (the main subject for dockerfile case) except manual retyping explicitly
npm i ...
per every single git module?thx
Steps To Reproduce
see Current Behavior
Environment
The text was updated successfully, but these errors were encountered: