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
When installing packages in Project B prettier-plugin-organize-imports is located under node_modules/projecta/node_modules because prettier-plugin-organize-imports contains
and vue-tsc has a peer-dependency on typescript 5.0.0
"peerDependencies": {
"typescript": ">=5.0.0"
},
When project B is moved to typescript 5.0.0 then prettier-plugin-organize-imports is located under node_modules/ directly.
To reproduce:
npm pack in projectA
npm install ../projectA/projecta-1.0.0.tgz
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
npm pack in projectA
npm install ../projectA/projecta-1.0.0.tgz
observe node modules layout
update typescript dependency in project b
after a clean install in project b the node_modules structure changes
Environment
npm: 10.8.1 (also in 9.8.1 and 10.9.0)
Node.js: tried 18 /20 /22
OS Name: Ubuntu 20.04
System Model Name: Lenovo Thinkpad
npm config:
; node bin location = /home/XXX/.nvm/versions/node/v22.11.0/bin/node; node version = v22.11.0; npm local prefix = /home/XXX/work/npm_repro/projectB; npm version = 10.9.0; cwd = /home/XXX/work/npm_repro/projectB; HOME = /home/XXX; Run `npm config ls -l` to show all defaults.
The text was updated successfully, but these errors were encountered:
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: