# Connect your components

Setup errors tell you which layer is missing and give you a concrete next step. Keep the stable error code when asking a person or agent for help.

## slices/registry-missing

The service registry has not loaded. If services/index.ts already exists, import it in your headless component. If it does not exist, install the service with the command included in the error first, or add the file alone: npx shadcn@latest add "https://slices.sh/r/services.json"

```
"use client"

// services/index.ts comes from https://slices.sh/r/services.json (or any provider setup)
import "@/services"
import { SignIn } from "@slices.sh/auth/headless"
```

## slices/service-missing

The registry is loaded, but it contains no config for this service. Install a provider using a setup URL. The installation creates the configuration and route.

```
npx slices.sh add auth.betterauth --auth-methods google --db mongo
```

## slices/config-missing

The service exists, but the named config does not. Copy default.config.ts to a second file, update its options and Configs declaration, then use its filename as the root's config prop. Or omit config to use default.

## slices/capability-missing

The root explicitly requires a capability the provider does not grant. Change the provider options, or remove the explicit requirement. Hidden optional controls produce development warnings, so a missing Google button explains how to enable Google.

## extraorbital/missing-env

The provider is installed but its resource has no credentials. Provision the named resource, or set the variables listed in the error. Restart the server.

```
npx extraorbital provision
```

## Using webpack

Wrap your Next configuration with withSlices so the service registry gets explicit imports. The wrapper scans your config files when Next starts; restart after adding a config.

```
import { withSlices } from "@slices.sh/core/next"

export default withSlices({})
```
