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