---
title: "DF0070: Invalid Service"
description: "Invalid service \"{package}\": {reason}"
canonical_url: "https://devfra.me/errors/df0070"
---
# DF0070: Invalid Service

> Invalid service "\{package}": \{reason}

## Message

> Invalid service "`{package}`": `{reason}`

## Cause

A wire service failed structural validation at install time. The `reason` names the specific gap:

- the install input has no `package` name,
- a definition is missing its `version` or its RPC `scope` namespace,
- an imported service package's default export is not a factory function,
- the factory didn't return a definition with a `setup` function.

## Example

```ts
/** ✗ A pre-built instance as the default export, not a factory. */
export default createShikiService()

/** ✓ The factory itself. */
export default createShikiService
```

## Fix

A service package's default export must be its `create<X>Service` factory, returning a `DevframeServiceDefinition`: an object with `package`, `version`, `scope`, and a `setup` function. See [Cross-Devframe Services](https://devfra.me/guide/services#wire-services) for the full shape.

## Source

- [`packages/devframe/src/node/host-services.ts`](https://github.com/devframes/devframe/blob/main/packages/devframe/src/node/host-services.ts): `install()` validates its input; the pre-setup construction validates imported factories and the definitions they return.


## Sitemap

See the full [sitemap](https://devfra.me/sitemap.md) for all pages.
