Skip to content

packages keys do not appear to be true paths #645

Open
@craxal

Description

@craxal

Documentation for the keys of the packages property in package-lock.json files describes them as "relative paths from the root project folder". This does not appear to be entirely true.

Consider the following package.json:

package.json:

{
  "name": "my-project",
  "dependencies": {
    "@scope/package-a": "^1.0.0",
  }
}

Assume also that "@scope/package-a" has a dependency on a package called "@scope.package-b". When npm installs dependencies, the project directory structure looks like this:

my-project
├─node_modules
│ └─@scope
│   ├─package-a
│   └─package-b
├─package.json
└─package-lock.json

However, package-lock.json has the following entry under packages:

"node_modules/@scope/package-a/node_modules/@scope/package-b": {
  "version": "1.0.0",
  ...
},

Notice the path does not actually exist in the directory.

Documentation should be clear about whether this is expected or whether the relative paths, as described, are true paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentIssues or PRs related to the content of the docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy