[BUG] Optional peer dependency influences node_modules layout #8028
Labels
Content-Length: 211868 | pFad | http://github.com/npm/cli/issues/8028
BCFetched URL: http://github.com/npm/cli/issues/8028
Alternative Proxies:
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Given the following projects:
Project A
Project B
When installing packages in Project B
prettier-plugin-organize-imports
is located undernode_modules/projecta/node_modules
becauseprettier-plugin-organize-imports
containsand vue-tsc has a peer-dependency on typescript 5.0.0
When project B is moved to typescript 5.0.0 then
prettier-plugin-organize-imports
is located undernode_modules/
directly.To reproduce:
After changing the typescript Version in project B to 5.6.2 the layout of node_modules changes
One workaround is to override the vue-tsc dependency of
prettier-plugin-organize-imports
to vue-tsc in version 2.0.20 which has a peer dependency to typescript "*".Expected Behavior
The optional peer-dependency should not influence the layout of node_modules if not present. So the layout of node_modules should be the same in both cases (typescript 4.9.5 and typescript 5.0.0).
Steps To Reproduce
Environment
The text was updated successfully, but these errors were encountered: