Skip to content

[Help] How to run wazuh-dashboard and wazuh-dashboard-plugins in development mode? #7660

@LengGeng

Description

@LengGeng

Description
I am trying to make changes to wazuh-dashboard.
I followed the instructions from https://github.com/wazuh/wazuh-dashboard-plugins/tree/main/docker/osd-dev to set up the development environment.
The version I am using is v4.12.0.

However, when running yarn osd bootstrap with the wazuh-dashboard-plugins included, I encounter a single_version_dependencies error.


Steps to Reproduce

  1. Clone the repository:

    git clone -b v4.12.0 https://github.com/wazuh/wazuh-dashboard-plugins.git
  2. Go to the dev docker folder:

    cd wazuh-dashboard-plugins/docker/osd-dev
  3. Start the development environment:

    ./dev.sh /develop/wazuh/wazuh-dashboard-plugins/plugins/ up
  4. Enter the container:

    docker exec -it os-dev-2191-osd-1 bash
  5. Run bootstrap:

    yarn osd bootstrap

Error Log

ERROR [single_version_dependencies] Multiple version ranges for the same dependency
      were found declared across different package.json files. Please consolidate
      those to match across all package.json files. Different versions for the
      same dependency is not supported.

      If you have questions about this please reach out to the operations team.

      The conflicting dependencies are:

        @typescript-eslint/eslint-plugin
          ^3.10.0 => opensearch-dashboards
          ^6.2.1 => wazuh, wazuh-check-updates, wazuh-core
        @typescript-eslint/parser
          ^3.10.0 => opensearch-dashboards
          ^6.2.1 => wazuh, wazuh-check-updates, wazuh-core
        dompurify
          ^3.2.4 => opensearch-dashboards
          ^3.1.3 => wazuh
        eslint
          ^6.8.0 => opensearch-dashboards, observability-dashboards, gantt-chart-dashboards
          ^8.46.0 => wazuh, wazuh-check-updates, wazuh-core
        eslint-config-prettier
          ^6.11.0 => opensearch-dashboards
          ^8.5.0 => wazuh, wazuh-check-updates, wazuh-core
        eslint-plugin-cypress
          ^2.8.1 => opensearch-dashboards, opensearch-security-dashboards
          ^2.12.1 => wazuh, wazuh-check-updates, wazuh-core
        eslint-plugin-import
          ^2.25.4 => opensearch-dashboards
          ^2.29.1 => wazuh, wazuh-check-updates, wazuh-core
        eslint-plugin-prettier
          ^3.1.4 => opensearch-dashboards
          ^4.2.1 => wazuh, wazuh-check-updates, wazuh-core
        eslint-plugin-react
          ^7.20.3 => opensearch-dashboards
          ^7.31.8 => wazuh, wazuh-check-updates, wazuh-core
        eslint-plugin-react-hooks
          ^4.0.4 => opensearch-dashboards
          ^4.6.0 => wazuh, wazuh-check-updates, wazuh-core
        prettier
          ^2.1.1 => opensearch-dashboards, @osd/plugin-generator, @osd/pm, spec-to-console, opensearch-alerting-dashboards, customImportMap
          ^2.7.1 => wazuh, wazuh-check-updates, wazuh-core
        typescript
          4.0.2 => opensearch-dashboards, @osd/ace, @osd/analytics, @osd/apm-config-loader, @osd/config-schema, @osd/config, @osd/cross-platform, @osd/dev-utils, @osd/i18n, @osd/logging, @osd/monaco, @osd/plugin-helpers, @osd/pm, @osd/std, @osd/stylelint-plugin-stylelint, @osd/telemetry-tools, @osd/utils, app_link_test, core_app_status, core_plugin_a, core_plugin_appleave, core_plugin_b, core_plugin_chromeless, core_plugin_route_timeouts, corePluginStaticAssets, core_provider_plugin, dashboard_listing_test_plugin, data_search_plugin, docViewLinksPlugin, docViewPlugin, index_patterns_test_plugin, management_test_plugin, opensearchh_client_plugin, osd_sample_panel_action, osd_top_nav, osd_tp_custom_visualizations, rendering_plugin, ui_settings_plugin, osd_tp_run_pipeline, opensearch-security-dashboards
          ^5.5.2 => wazuh, wazuh-check-updates, wazuh-core
        axios
          ^0.29.0 => @osd/dev-utils, @osd/ui-shared-deps
          ^1.7.4 => wazuh, wazuh-check-updates, wazuh-core
        husky
          ^8.0.0 => opensearch-alerting-dashboards, opensearch-security-dashboards
          6.0.0 => observability-dashboards
          ^3.0.0 => opensearch_index_management_dashboards
        lint-staged
          ^10.2.0 => opensearch-alerting-dashboards, opensearch_index_management_dashboards
          ^15.2.10 => observability-dashboards
        @types/react-test-renderer
          ^18.0.7 => customImportMap
          ^18.0.0 => observability-dashboards
        @testing-library/user-event
          ^14.5.1 => observability-dashboards
          ^13.1.9 => opensearch_index_management_dashboards
          ^14.5.0 => wazuh-check-updates, wazuh-core
        @types/react-plotly.js
          ^2.6.3 => observability-dashboards
          ^2.6.0 => gantt-chart-dashboards
        @types/node-cron
          ^2.0.3 => wazuh
          ^3.0.8 => wazuh-check-updates
        node-cron
          ^1.1.2 => wazuh
          ^3.0.2 => wazuh-check-updates, wazuh-core
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Question
How can I properly run wazuh-dashboard with wazuh-dashboard-plugins in development mode without encountering this single_version_dependencies issue?
Is there a recommended way to align dependencies between wazuh-dashboard and wazuh-dashboard-plugins?

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