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
One of the features that pnpm provides is "strictness":
Strict. A package can access only dependencies that are specified in its package.json.
It is helpful for developers to not require() packages that doesn't exist in package.json.
The thing is, when a package that developer uses but isn't in charge (such as jest) requires things that don't exist in their package.json, the package won't work.
One known workaround is using hook but this solution is rather complicated.
Hence, I think that strict installation is only useful at top level (folder that we edit, usually contains .git and package.json) but not at dependencies level (sub-folders of node_modules or ~/.pnpm-store).
Strictness is just a nice bonus of pnpm's design. This strictness + the unique node_modules structure are the secrets of pnpm's speed.
Flat node_modules is not a feature of npm/yarn, it is a side effect of their installation algorithm. We are not going to introduce complexity to pnpm to fix bugs that should be fixed by the ecosystem.
One of the features that pnpm provides is "strictness":
It is helpful for developers to not
require()
packages that doesn't exist inpackage.json
.The thing is, when a package that developer uses but isn't in charge (such as jest)
require
s things that don't exist in theirpackage.json
, the package won't work.One known workaround is using hook but this solution is rather complicated.
Hence, I think that strict installation is only useful at top level (folder that we edit, usually contains
.git
andpackage.json
) but not at dependencies level (sub-folders ofnode_modules
or~/.pnpm-store
).Related issue: #1007
The text was updated successfully, but these errors were encountered: