DF8111: Bare-Specifier Client Script Without Host Resolution

Dock "{id}" declares the bare-specifier client script "{specifier}", but this host advertises no client-module resolution; the browser cannot resolve a bare npm specifier natively, so the script will fail to load.

Message

Dock "{id}" declares the bare-specifier client script "{specifier}", but this host advertises no client-module resolution; the browser cannot resolve a bare npm specifier natively, so the script will fail to load.

Cause

A dock entry's client script (clientScript, action, renderer) names a bare npm specifier as its importFrom. Client scripts load with a native browser import(), which resolves only URL specifiers; a bare specifier needs the host runtime to resolve it, advertised as clientModuleResolution. This host advertises none, so the script fails to load.

Example

initHub({
  base: '/__devframes/',
  configure(ctx) {
    ctx.docks.register({
      type: 'action',
      id: 'vue-tracer',
      title: 'Vue Tracer',
      icon: 'ph:crosshair-simple-duotone',
      /** ✗ Bare specifier on a host with no `clientModuleResolution` */
      action: { importFrom: 'vite-plugin-vue-tracer/client/vite-devtools' },
    })
  },
})

Fix

Pick whichever side you control:

  • Run under a host framework that resolves bare specifiers: declare initHub({ clientModuleResolution }) (e.g. Vite's '/@id/{specifier}'). @devframes/vite/hub sets this by default.
  • Ship the script as a self-contained bundle served by URL, and pass that URL as importFrom (after ctx.host.mountStatic(...)).
  • Resolve it in the hub UI provider via createDevframeClientRuntime({ resolveClientModule }); then disregard this warning.

Source

  • packages/hub/src/node/host-docks.ts: DevframeDocksHost.register() warns when a bare-specifier client script registers on a host whose staticConfig.dock declares no clientModuleResolution.