8000 Compatibility with @gouvfr/dsfr-chart 2.x · Issue #391 · codegouvfr/react-dsfr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Compatibility with @gouvfr/dsfr-chart 2.x #391
Open
@tonai

Description

@tonai

By default when installing @gouvfr/dsfr-chart, it will install version 2.x that is not compatible with react-dsfr.
I got the following error when trying to use the bar chart component:

✘ [ERROR] Missing "./BarChart/bar-chart.common" specifier in "@gouvfr/dsfr-chart" package [plugin vite:dep-pre-bundle]

    node_modules/@codegouvfr/react-dsfr/Chart/BarChart.js:4:7:
      4 │ import "@gouvfr/dsfr-chart/BarChart/bar-chart.common";
        ╵        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  This error came from the "onResolve" callback registered here:

    node_modules/esbuild/lib/main.js:1151:20:
      1151 │       let promise = setup({
           ╵                     ^

    at setup (file:///home/tocab/Projects/Clients/IGN/cartes.gouv.fr/node_modules/vite/dist/node/chunks/dep-ByPKlqZ5.js:16969:13)
    at handlePlugins (/home/tocab/Projects/Clients/IGN/cartes.gouv.fr/node_modules/esbuild/lib/main.js:1151:21)
    at buildOrContextImpl (/home/tocab/Projects/Clients/IGN/cartes.gouv.fr/node_modules/esbuild/lib/main.js:874:5)
    at Object.buildOrContext (/home/tocab/Projects/Clients/IGN/cartes.gouv.fr/node_modules/esbuild/lib/main.js:700:5)
    at /home/tocab/Projects/Clients/IGN/cartes.gouv.fr/node_modules/esbuild/lib/main.js:2039:68
    at new Promise (<anonymous>)
    at Object.context (/home/tocab/Projects/Clients/IGN/cartes.gouv.fr/node_modules/esbuild/lib/main.js:2039:27)
    at Object.context (/home/tocab/Projects/Clients/IGN/cartes.gouv.fr/node_modules/esbuild/lib/main.js:1881:58)
    at prepareEsbuildOptimizerRun (file:///home/tocab/Projects/Clients/IGN/cartes.gouv.fr/node_modules/vite/dist/node/chunks/dep-ByPKlqZ5.js:19170:33)

It would be great if react-dsfr can be compatible with version 2.x of @gouvfr/dsfr-chart

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

      0