 
     @packageEventEmitter.on 'package-installed', (error, pack) =>
       if error?
-        console.error(error.stack ? error)
-        errorView = @createErrorView(error.message, error.stderr)
-        errorView.insertAfter(@packageFilter)
+        @showPackageError(error)
       else
         @addInstalledPackage(pack)
 
     @packageEventEmitter.on 'package-uninstalled', (error, pack) =>
       if error?
-        console.error(error.stack ? error)
-        errorView = @createErrorView(error.message, error.stderr)
-        errorView.insertAfter(@packageFilter)
+        @showPackageError(error)
       else
         @removeInstalledPackage(pack)
 

            @span class: 'badge pull-right', outlet: 'availableCount'

      @subview 'packageFilter', new Editor(mini: true, attributes: {id: 'package-filter'})
      @div outlet: 'installedPackages'
      @div outlet: 'availablePackages'


          @availablePackages.append(view)

      @updateAvailableCount()

  showPackageError: (error) ->
    console.error(error.stack ? error)
    errorView = @createErrorView(error.message, error.stderr)
    @errors.append(errorView)
    @parent().scrollTop(errorView.offset().top - @offset().top)

  createLoadingView: (text) ->
    $$ ->
