-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Bugthing that needs fixingthing that needs fixingRelease 6.xwork is associated with a specific npm 6 releasework is associated with a specific npm 6 release
Description
Current Behavior:
When a package has a shrinkwrap which includes an aliased dependency (e.g. "lodash4": "npm:lodash@^4.17.19"
), it will installed the latest version of that dependency that matches the range in the package.json
, but not the version that is in the shrinkwrap, when installing with the -g
flag.
Example: aliased
/Users/dominykas/.nvm/versions/node/v12.20.0/lib
├─┬ @dominykas/[email protected]
│ └── lodash4@npm:[email protected]
Example: unaliased
/Users/dominykas/.nvm/versions/node/v12.20.0/lib
├─┬ @dominykas/[email protected]
│ └── [email protected]
Expected Behavior:
Shrinkwrap should be respected.
The same behavior is exhibited with bundledDependencies
when they are aliased.
This only works correctly when you're running npm install
in a folder which contains the shrinkwrap (but not when installing globally or as a dependency).
Environment:
- npm: v6.14.9
npm@next-7 seems to deal with this correctly.
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingRelease 6.xwork is associated with a specific npm 6 releasework is associated with a specific npm 6 release