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:
./app and ./my-local-pkg, each with their own package.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
./app and run npm 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
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
apphasmy-local-pkgas a dependency, runningnpm installgeneratesapp/node_modulesfolder and alsomy-local-pkg/node_modules(with its dependencies).In npm v7, however, only
app/node_modulesis generated.Steps To Reproduce:
I created the following repository to illustrate it. The
README.mdhas the instructions on how to reproduce it.Simplified, the steps are:
./appand./my-local-pkg, each with their ownpackage.json./app/package.json:./my-local-pkg/package.json:./appand runnpm install.npm version 6 produces:
while npm version 7 produces:
Compare the two outputs, npm v7 does not install
my-local-pkgdependencies, there is no./my-local-pkg/node_modulesfolder generated.Environment:
npm v7.1.2