Skip to content

package-lock file changing based on local repository name #2264

Closed
@NickAJScott

Description

@NickAJScott

Current Behavior:

package-lock.json changes depending on name of local copy of git repo, e.g. if i have two copies of the same repo locally one which matches the name in package.json and one which doesn't i get two different package-lock files, one specifies the name of the package in the inner packages list and one doesn't.

Expected Behavior:

package-lock.json should be independent of top level directory name, when working in a team there shouldn't be unnecessary changes to package-lock file due to a team member having a different local name of their git repository.

Steps To Reproduce:

  1. clone a repository twice one in the default named directory and one into a name that differs from the repo name.
  2. run npm install
  3. two different package-lock files will be generated.

Environment:

  • OS: Ubuntu 20.04
  • Node: 15.3.0
  • npm: 7.0.14

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions