JulioM
Posts: 1
Joined: Fri Oct 11, 2024 10:46 pm

Dashboard with React

When I follow the same instructions in the documentation I get the following error

ERROR in ./node_modules/@highcharts/dashboards/modules/layout.js
Module not found: Error: Can't resolve 'dashboards' in 'C:\Users\node_modules\@highcharts\dashboards\modules'

I have already installed the update versions but I get the same error.
michal.f
Site Moderator
Posts: 1127
Joined: Thu Aug 12, 2021 12:04 pm

Re: Dashboard with React

Hello!

Can you reproduce this demo in an online editor or send the code?

As an example, I am sending how to properly use dashboards in a React project: https://stackblitz.com/edit/stackblitz- ... hboard.tsx

Since React is usually used with frameworks like NextJS, here are some more examples for it: https://stackblitz.com/edit/stackblitz- ... hboard.jsx
And here is an example of how to correctly add modules in a React wrapper in NextJS because you need to exclude server-side initialization: https://stackblitz.com/edit/stackblitz- ... eChart.jsx

Maybe this will be helpful and enough for you.
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Dashboards”