refinedev/refine · error · Error

Invalid provider: ${providerId}

Error message

Invalid provider: ${providerId}

What it means

Thrown by refine's CLI 'add provider' command when the providerId passed to getProviderOptions does not match any entry in the availableProviders list. The CLI can only scaffold known data/auth provider templates.

Source

Thrown at packages/cli/src/commands/add/sub-commands/provider/create-providers.ts:94

          }
        });
      } catch (error) {}
    }

    if (copiedAssets.length) {
      console.log(`🎉 Created additional assets: ${copiedAssets.join(", ")}`);
    }
    if (failedAssets.length) {
      console.error(`❌ Failed to create assets: ${failedAssets.join(", ")}`);
    }
  });
};

export const getProviderOptions = (providerId: ProviderId): Provider => {
  const provider = availableProviders.find((p) => p.id === providerId);

  if (!provider) {
    throw new Error(`Invalid provider: ${providerId}`);
  }

  return provider;
};

export const getDefaultPath = () => {
  const projectType = getProjectType();
  const { path } = getProviderPath(projectType);
  return path;
};

View on GitHub (pinned to 779d52a20e)

Solutions

  1. Run `refine add provider` without an argument to see the interactive list of valid provider ids
  2. Check the provider's exact id in the CLI's availableProviders / docs and retry with the exact spelling
  3. Update the CLI (`npm update @refinedev/cli`) in case the provider was added in a newer version
  4. Add the provider manually by installing its package and wiring it in the dataProvider/authProvider props

Example fix

// before
refine add provider supabasse
// after
refine add provider supabase
Defensive patterns

Strategy: validation

Validate before calling

npx refine add provider # interactive list shows valid ids

Prevention

When it happens

Trigger: Running `refine add provider <id>` with an unknown or misspelled id, e.g. `refine add provider strapi4` when the registered id is 'strapi', or passing an arbitrary string.

Common situations: Typos in provider names; provider ids changing between CLI versions; users assuming any community provider is supported by the CLI scaffolder.

Related errors


AI-assisted analysis of refinedev/refine@779d52a20e (2026-08-27). Data as JSON: /api/errors/04a3c907c0d1f7b4. Report an issue: GitHub.