Skip to content

Build warnings due to missing defaultOptions export in @grafana/schema@12.4.0 used with @grafana/scenes@7.1.7 #1401

@slaughtlaught

Description

@slaughtlaught

We are using @grafana/scenes@7.1.7 with @grafana/schema@12.4.0 in a plugin. The peerDependencies of scenes allow @grafana/schema >=11.6, so 12.4.0 should be compatible. However, during webpack build we get warnings like:

export 'defaultOptions' (imported as 'defaultOptions$2') was not found in '@grafana/schema/dist/esm/raw/composable/table/panelcfg/x/TablePanelCfg_types.gen' (possible exports: pluginVersion)

In @grafana/schema@12.4.0 that file indeed exports only pluginVersion, not defaultOptions. The scenes code tries to import it, causing warnings.

Despite the warnings, our plugin (which builds table panels) works fine at runtime – no crashes. But the warnings clutter the build output and may signal a future incompatibility.

Expected behavior:
No warnings when using a version of @grafana/schema that satisfies the peer dependency range.

Steps to reproduce:

  1. Create a plugin with @grafana/scenes@7.1.7 and @grafana/schema@12.4.
  2. Run a build.
  3. See warnings.

Environment:

@grafana/scenes: 7.1.7
@grafana/schema: 12.4.0
Other Grafana packages: 12.4.0

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions