teambit / bvm

Bit version manager
Other
40 stars 13 forks source link

'bvm remove --all' throws exception and deadlocks #83

Open mathias-falkenberg opened 1 year ago

mathias-falkenberg commented 1 year ago

OS: Windows 10 Enterprise (10.0.19045) bvm v0.3.1 node v18.15.0 npm v9.5.0

I have multiple versions of bit installed:

➜ bvm list
0.0.888
0.1.11
0.1.4
0.1.7

The help text for bvm provides a broken example for removal (bvm remove all --keep-latest-versions 3). Running bvm remove -h, however, provides the proper --all switch syntax.

Running bit remove --all yields the following:

➜ bvm remove --all
⠹ removing versions from the file systemCannot read properties of undefined (reading 'removeVersions')
TypeError: Cannot read properties of undefined (reading 'removeVersions')
    at C:\ProgramData\nvm\v18.15.0\node_modules\@teambit\bvm\node_modules\@teambit\bvm.remove\dist\remove.js:65:21
    at Generator.next (<anonymous>)
    at fulfilled (C:\ProgramData\nvm\v18.15.0\node_modules\@teambit\bvm\node_modules\@teambit\bvm.remove\dist\remove.js:5:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
⠏ removing versions from the file system

After this, the command seems to be stuck in an infinite loop.