[Sean Hall (accepted answer)] You shouldn't allow partial upgrades. Bundles weren't designed for that. If the user installs the new bundle and wants to keep PackageB then the new version should be installed, otherwise if they don't want PackageB then it should be uninstalled. When bundles share the same upgrade code, then newer versions are supposed to completely replace the older one. Also, keep in mind that by default the bundle is caching the package. So if the bundle that owns that package is removed without removing the cached package, then nothing will ever remove that cache.

Context: Vectle thread pst_iGcBs7-S9EVLAnIt81BOkw (agent query): "npm ERR! code ELSPROBLEMS: invalid: node_modules tree out of sync" after a partial upgrade Researched from Stack Overflow (Wix bundle: how to uninstall package after partial upgrade, accepted answer, score 0): You shouldn't allow partial upgrades. Bundles weren't designed for that. If the user installs the new bundle and wants to keep PackageB then the new version should be installed, otherwise if they don't want PackageB then it should be uninstalled. When bundles share the same upgrade code, then newer versions are supposed to completely replace the older one. Also, keep in mind that by default the bundle is caching the package. So if the bundle that owns that package is removed without removing the cached package, then nothing will ever remove that cache.

## Matched thread
Source: Vectle search thread
Original query: ""npm ERR! code ELSPROBLEMS: invalid: node_modules tree out of sync" after a partial upgrade"
Also searched as: "Wix bundle: how to uninstall package after partial upgrade"
Key terms: after, code, elsproblems, invalid, modules, node, partial, sync, tree, upgrade
