heroku / cli-engine

https://github.com/oclif/oclif
ISC License
97 stars 14 forks source link

plugin stuck as installed if ctrl-c during install #274

Open jdx opened 7 years ago

jdx commented 7 years ago
 ▸    'MODULE_NOT_FOUND': Cannot find module '/Users/fvieira/.local/share/heroku/plugins/node_modules/heroku--kafka'
Repairing plugin /Users/fvieira/.local/share/heroku/plugins/node_modules/heroku--kafka... !
 ▸    Error parsing plugin /Users/fvieira/.local/share/heroku/plugins/node_modules/heroku--kafka
Repairing plugin /Users/fvieira/.local/share/heroku/plugins/node_modules/heroku--kafka... !
 ▸    yarn install --force --non-interactive --mutex=file:/Users/fvieira/Library/Caches/heroku/yarn --cache-folder=/Users/fvieira/Library/Caches/heroku/yarn exited with code 1
 ▸    warning No license field
 ▸    error An unexpected error occurred: "https://cli-npm.heroku.com/heroku--kafka: no such package available".
 ▸    
Repairing plugin /Users/fvieira/.local/share/heroku/plugins/node_modules/heroku--kafka... done
Installing plugin heroku-kafka... !
 ▸    'MODULE_NOT_FOUND': Cannot find module '/Users/fvieira/.local/share/heroku/plugins/node_modules/heroku--kafka'
Repairing plugin /Users/fvieira/.local/share/heroku/plugins/node_modules/heroku--kafka... !
 ▸    Error parsing plugin /Users/fvieira/.local/share/heroku/plugins/node_modules/heroku--kafka
Repairing plugin /Users/fvieira/.local/share/heroku/plugins/node_modules/heroku--kafka... !
 ▸    yarn install --force --non-interactive --mutex=file:/Users/fvieira/Library/Caches/heroku/yarn --cache-folder=/Users/fvieira/Library/Caches/heroku/yarn exited with code 1
 ▸    warning No license field
 ▸    error An unexpected error occurred: "https://cli-npm.heroku.com/heroku--kafka: no such package available".
 ▸    
Repairing plugin /Users/fvieira/.local/share/heroku/plugins/node_modules/heroku--kafka... !
 ▸    yarn --non-interactive --mutex=file:/Users/fvieira/Library/Caches/heroku/yarn --cache-folder=/Users/fvieira/Library/Caches/heroku/yarn exited with code 1
 ▸    warning No license field
 ▸    error An unexpected error occurred: "https://cli-npm.heroku.com/heroku--kafka: no such package available".
 ▸    

[3:12 PM] i had to manually remove heroku--kafka from ~/.local/share/heroku/plugins/package.json

jdx commented 7 years ago

from @fnando

jdx commented 7 years ago

this happens because we add the plugin to package.json, then attempt to install. We could either add a ctrl-c hook or somehow know that the installation wasn't successful and remove it instead of attempting to repair later

jdx commented 6 years ago

a related problem that should also be resolved: if some kind of error is causing plugins:uninstall to fail it can't continue to uninstall the plugin