Cannot remove unused optional dependency #8606
-
my original package.json was... "devDependencies": {
"vite": "^5.4.8",
"stylus": "^0.63.0",
} running
the lock file looks like... (click to expand)packages:
[email protected]:
resolution: {integrity: sha512-OMlgrTCPzE/ibtRMoeLVhOY0RcNuNWh0rhAVqeKnk/QwcuUKQbnqhZ1kg2vzD8VU/6h3FoPTq4RJPHgLBvX6Bw==}
hasBin: true
[email protected]:
resolution: {integrity: sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:
'@types/node': ^18.0.0 || >=20.0.0
less: '*'
lightningcss: ^1.21.0
sass: '*'
sass-embedded: '*'
stylus: '*'
sugarss: '*'
terser: ^5.4.0
peerDependenciesMeta:
'@types/node':
optional: true
less:
optional: true
lightningcss:
optional: true
sass:
optional: true
sass-embedded:
optional: true
stylus:
optional: true
sugarss:
optional: true
terser:
optional: true
snapshots:
[email protected](@types/[email protected])([email protected])([email protected])([email protected]):
dependencies:
esbuild: 0.21.5
postcss: 8.4.45
rollup: 4.21.3
optionalDependencies:
'@types/node': 20.16.1
fsevents: 2.3.3
sass: 1.78.0
stylus: 0.63.0
terser: 5.32.0
optional: true
[email protected]:
dependencies:
'@adobe/css-tools': 4.3.3
debug: 4.3.4
glob: 7.1.6
sax: 1.3.0
source-map: 0.7.3
transitivePeerDependencies:
- supports-color later on, I want to remove running
but the lock file is almost unchanged. more importantly, it still has the "snapshot" of [email protected](@types/[email protected])([email protected])([email protected])([email protected]):
dependencies:
esbuild: 0.21.5
postcss: 8.4.45
rollup: 4.21.3
optionalDependencies:
'@types/node': 20.16.1
fsevents: 2.3.3
sass: 1.77.7
stylus: 0.63.0 <--- I don't need it anymore!
terser: 5.32.0 the question is, how do I remove |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Never mind. I have removed every mention of |
Beta Was this translation helpful? Give feedback.
-
From pnpm v9.12 you can use this override to remove {
"pnpm": {
"overrides": {
"stylus": "-"
}
}
} |
Beta Was this translation helpful? Give feedback.
Never mind. I have removed every mention of
stylus
in the lock file manually together withrm -rf node_modules
andrm -rf $(pnpm store path)