I want to use Gantt chart in vue3, but I reported an error

Hey, guys

I have a new project that uses vue3+ts+vite. I tried to use the Gantt chart component, but several methods reported errors.

The first method is to use NPM to install and import
image
When running, an error occurs in the following figure

In the second method, I used the pro version of 7.0.11 and imported it from the local file
image
But the browser reported the following error

When I use the method in the following figure, dhtmlxgantt will become a module, sometimes it can take values, sometimes it can’t take values
image

Please answer how I should operate normally and why. Thank you very much

Hi,
Can you show me your code or attach a demo where I could reproduce the issue? I checked for the basic version of JS dhtmlxGantt in a Vue app and everything seems to work.
Here is a simple example with version 7.1.12 installed via NPM: https://files.dhtmlx.com/30d/dda7254000c380bd72aa5407dc941d95/vue3+gantt.zip

And here is an example with version 7.1.12 imported from a local file: https://files.dhtmlx.com/30d/e99b2c88f8066382ff7463246a005b90/vue3+gantt-instance+trial_7.1.12.zip

Thank you very much for your timely reply. I will study your example carefully

1 Like