HomeInstallation and Upgrade ManualInstallation TroubleshootingUpgrade Errors: "Command update is not defined" or Class Not Found

5.1. Upgrade Errors: "Command update is not defined" or Class Not Found

Updated: 28 Jul 2026, 02:06 PM EDT

When upgrading HelpSpot 5 you may encounter one of the following errors when running the database upgrade step from the Minor Version Upgrades (v5) documentation:

ERROR  Command "update" is not defined.

You may also notice that update and other HelpSpot commands (install, license, mailbox) are missing entirely when running php hs list, while the standard framework commands are still present.

Or, an error similar to:

In Application.php line 1034:

  Class "Laravel\Tinker\TinkerServiceProvider" not found

Cause

Both errors are caused by stale cache files from your previous HelpSpot version being present in the new installation's bootstrap/cache directory. These cached manifests reference service providers and classes from the old version, which prevents the new version from registering its commands or booting correctly.

This most commonly happens when an upgrade script copies the bootstrap/cache directory back from the old installation (for example, to preserve directory permissions). The contents of this directory should never be carried over between versions — HelpSpot rebuilds these files automatically when the application boots. Only the directory's permissions need to be correct (writable by the web server process).

Solution

From your HelpSpot directory, clear the stale caches and rebuild the autoloader:

Linux:

sudo -u www-data php hs optimize:clear
sudo -u www-data php ./vendor/bin/composer dump-autoload
sudo -u www-data php hs package:discover

Windows:

php hs optimize:clear
php .\vendor\bin\composer dump-autoload
php hs package:discover

If optimize:clear itself fails due to the stale caches, you can simply delete all *.php files inside the bootstrap/cache directory (leave the directory itself in place) and then run the commands above.

Then verify the HelpSpot commands are available again:

php hs list

You should see update in the list of available commands. Complete the upgrade by running:

php hs update

Prevention

When following the upgrade process, never copy the bootstrap/cache directory (or the vendor directory) from your old installation into the new one. If your upgrade is scripted, ensure the script only resets the permissions on bootstrap/cache rather than copying its contents.

This page was: Helpful | Not Helpful