-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Bugthing that needs fixingthing that needs fixingEnhancementnew feature or improvementnew feature or improvementPriority 1high priority issuehigh priority issueRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 release
Description
Current Behavior:
npm v7 does not install linked local packages dependencies.
Expected Behavior:
In npm v6 the dependencies of a local linked package are installed. This means that if app has my-local-pkg as a dependency, running npm install generates app/node_modules folder and also my-local-pkg/node_modules (with its dependencies).
In npm v7, however, only app/node_modules is generated.
Steps To Reproduce:
I created the following repository to illustrate it. The README.md has the instructions on how to reproduce it.
Simplified, the steps are:
- Add the following folder structure:
./appand./my-local-pkg, each with their ownpackage.json - Include this in the
./app/package.json:
{
"name": "app",
"dependencies": {
"my-local-pkg": "file:../my-local-pkg",
"prettier": "^2.2.1"
}
}
- Include this in the
./my-local-pkg/package.json:
{
"name": "my-local-pkg",
"dependencies": {
"typescript": "^4.1.3"
}
}
- Go to
./appand runnpm install.
npm version 6 produces:
node_modules
.bin
my-local-pkg
node_modules
typescript
prettier
while npm version 7 produces:
node_modules
.bin
my-local-pkg
prettier
Compare the two outputs, npm v7 does not install my-local-pkg dependencies, there is no ./my-local-pkg/node_modules folder generated.
Environment:
npm v7.1.2
raphinesse, rafgraph, alexander-schranz, niklasnatter, TommyRooryck and 87 more
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingEnhancementnew feature or improvementnew feature or improvementPriority 1high priority issuehigh priority issueRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 release