Skip to content

NPMv3: Non-deterministic dependency tree - avoid by appending version number to folder name #4503

Closed
@SetTrend

Description

@SetTrend

The current situation of non-deterministic folder structure in NPM v3 isn't satisfying. Depending on the installation order, deep nested directory structures may still occur.

I suggest to append the version to the package name, then all packages may be installed into the same directory:

$ tree -d node_modules/
node_modules/
|-- mod-a@1.0.0
|-- mod-b@1.0.0
|-- mod-b@2.0.0
|-- mod-c@1.0.0

from

$ npm install
|-- mod-a@1.0.0
| |-- mod-b@1.0.0
|-- mod-c@1.0.0
| |-- mod-b@2.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    npmIssues and PRs related to the npm client dependency or the npm registry.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions