а

Gantt chart v4.0.10 PRO error in init()


#1

Cannot read property ‘config’ of undefined!

TypeError: Cannot read property ‘config’ of undefined.
at Object.t._get_skin (lib-dhtmlxgantt.js:205).
at Object.t._init_skin (lib-dhtmlxgantt.js:204).
at Object.t.init (lib-dhtmlxgantt.js:270).

Version: “4.0.10”

Also instead of our PRO 4th version I try to use last version 6.1.6 (with Webpack but console.log(gantt) and console.log(Gantt) shows undefined…


#2

Hi @Alexpi!

Please tell me if you use any framework. And please send me the archive with your project or give a link to the repository so that I could reproduce your issue and help to solve it.


#3

Hi @guldmi
Thank you for reply! I try to wrap a Gantt chart (Enterprise version v4.0.10) into the Vue.js component.
Unfortunately I am not sure I have permission to share source code (Gantt chart ).

Vue.js Wrapper: DHTMLganttChart.vue


#4

Hello Alex,
I reproduced the issue when the 4.0 version doesn’t work in a project where the 6.0 version works correctly. Unfortunately, I don’t specialize in vue.js, so I cannot tell you if you need to apply the additional code in vue.js to make the 4.0 version work. However, the same project works correctly with the 6.0 and 6.1 versions.

Here are the demo projects with Gantt where everything works correctly:
https://files.dhtmlx.com/30d/67417f7c66fa765e4ca444b7428512ed/vue+resource_chart.zip
https://files.dhtmlx.com/30d/01656ca4a5f6314b7d0dad7ae67a243e/height-issue.zip
https://files.dhtmlx.com/30d/3b7b98703cc5fa3e55e4ff7122e3fd0e/gantt_6.1+4.0.zip

Unfortunately, I cannot reproduce your use case because you sent only 1 file. If you cannot send the project with the source code, please, reproduce the issue in a test project and try adding Gantt there, then send the project to me. I will reproduce the issue locally and check if there is a way to start Gantt.


#5

Hi @ramil
Thank you for reply and your examples. I found that when I embed (copy/paste) the code of css and js files into my index.html file - it worked. The issue was with Vue (Webpack). I updated my gist:


Thanks to all!