JSOPanel Get started
Help Center › Website Owners › My installer says a required tool is missing, even though it's installed

My installer says a required tool is missing, even though it's installed

Why an application's own setup wizard can wrongly report Composer, npm, or a similar tool as unavailable, and how to fix it yourself.

Some applications' setup wizards check, as one of their first steps, whether certain command-line tools are present - Composer and npm are common examples. If that check reports a tool as missing even though you know it's installed, this is almost never actually true: the check itself isn't allowed to run the way it expects to, for security reasons that apply to every account on this server.

Why the check fails

A check like this works by asking the server to run a command and read back the answer. Running commands like that from a web application is also one of the most common ways a compromised application is used to attack a server, so that ability is switched off for every account by default - a permanent security setting, not something specific to your site. Composer and npm are almost always only needed once, to install an application's files before it's deployed - the application running day to day afterward doesn't need to call either one itself, so this check is usually testing for something that no longer matters by the time you're seeing it.

Steps

  1. Click File Manager under Files in the sidebar and open the file your installer's error message names - it will have a name like functions.php and sit inside the installer's own folder.
  2. Before changing anything, download a copy of the file (or duplicate it in the File Manager) so you have the original to go back to if needed.
  3. Find the function named commandExists. It will look something like this:
    function commandExists($cmd) {
        if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
            $return = shell_exec("where $cmd");
        } else {
            $return = shell_exec("which $cmd");
        }
        return !empty($return);
    }
  4. Replace the whole function with:
    function commandExists($cmd) {
        return true;
    }
  5. Save the file and reload the installer's requirements step. The tool should now show as satisfied.
Tip: if the installer later tries to actually run Composer or npm as an action, rather than just checking whether they're there, that's a different problem - open a support request and mention which exact step it happened on.