You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The install-strategy=shallow parameter affects only the contents of the "root" node_modules directory.
Expected Behavior
Install strategy sholud work both on root and workspace subprojects.
Steps To Reproduce
package.json
{
"workspaces": ["web"]
}
web/package.json
{
"name": "web"
}
npm install --install-strategy=shallow --workspace=web vite
ls web/node_modules/
Sholuld display only single vite directory but there are a lot: '@esbuild'/ '@rollup'/ '@types'/ esbuild/ nanoid/ picocolors/ postcss/ rollup/ source-map-js/ vite/
Environment
npm: 10.5.0
Node.js: 20.12.2
OS Name: Windows
System Model Name: 11
npm config:
fetch-retries = 0
update-notifier = false
The text was updated successfully, but these errors were encountered:
This is because your workspace does not exist on its own in the tree. To npm there is only one tree, and the workspaces themselves are direct deps of the root. From npm's perspective the install is shallow because in node_modules itself the workspace dependencies are not in the root, but under the workspace itself.
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
The
install-strategy=shallow
parameter affects only the contents of the "root" node_modules directory.Expected Behavior
Install strategy sholud work both on root and workspace subprojects.
Steps To Reproduce
package.json
web/package.json
Sholuld display only single
vite
directory but there are a lot:'@esbuild'/ '@rollup'/ '@types'/ esbuild/ nanoid/ picocolors/ postcss/ rollup/ source-map-js/ vite/
Environment
The text was updated successfully, but these errors were encountered: