---
title: "DF9003: onInstalled Threw"
description: "`onInstalled` threw after the packages were installed: {reason}"
canonical_url: "https://devfra.me/errors/df9003"
---
# DF9003: onInstalled Threw

> \`onInstalled\` threw after the packages were installed: \{reason}

## Message

> `onInstalled` threw after the packages were installed: `{reason}`

## Cause

The packages are installed. The host's `onInstalled` callback, which usually imports the new packages and starts the hub, threw. `{reason}` is its message; the original error is attached as `cause`.

## Fix

Read the `cause`. A frequent one is a module that cannot be resolved: resolve the new packages from the project root (`createRequire(join(cwd, 'package.json'))`), not from the config file, because under pnpm they are only reachable from there. A restart of the dev server also loads the installed packages.

## Source

- [`packages/hub-ui-onboard/src/index.ts`](https://github.com/devframes/devframe/blob/main/packages/hub-ui-onboard/src/index.ts): `install()` reports this and sets `state: 'error'` when `onInstalled` rejects.


## Sitemap

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