You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run a re-installation, changes occur in the package-lock file for a dependency from a local subdirectory - a “name” field for this dependency appears.
Expected Behavior
re-installation does not change the package-lock file:
the name field should appear during the first installation.
or the name field should not appear during re-installation.
; "user" config from /Users/username/.npmrc
//registry.npmjs.org/:_authToken = (protected)
auto-install-peers = true
; "project" config from /Users/username/git/projectname/.npmrcengine-strict = true
; node bin location = /usr/local/bin/node; node version = v21.6.0; npm local prefix = /Users/username/git/projectname; npm version = 10.3.0; cwd = /Users/username/git/projectname; HOME = /Users/username; Run `npm config ls -l` to show all defaults.
The text was updated successfully, but these errors were encountered:
…7602)
When metadata is committed for the first time when there is no
package-lock, when target node has the same name field value as target
package name and link node also share the same name field, name field is
omitted from lock file, in subsequent times when there is already a lock
file, it reads target node with name field derived from realpath value
of the node and included in lock file. this creates mismatch of lock
file between installs.
This PR adds additional condition to check if name derived from realpath
is the same name as package and adds the name property.
Fixes: #7166
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
If you run a re-installation, changes occur in the package-lock file for a dependency from a local subdirectory - a “name” field for this dependency appears.
Expected Behavior
re-installation does not change the package-lock file:
Steps To Reproduce
package.json
wasm/build/package.json
npm i
lock-file is:
npm i
againnow lock-file is:
Environment
The text was updated successfully, but these errors were encountered: