WebixJet+Kanban Cannot read property '$protoWait' of undefined

I try to use kanban with types in WebixJet app. But when i try to register types, i always get fail that is “Cannot read property ‘$protoWait’ of undefined”.

My code:

config(){
webix.type(webix.ui.kanbanlist,{
	name: "cards",

templateBody: (obj)=>{
			 
   let html = "<span class='webix_icon mdi mdi-account'>"+obj.user_id+"</span>";
   html += "<img class='image' src='imgs/attachments/"+obj.image+"'/>";
},
});
let config ={
view:"kanban", 
			cols:[ ...KanbanCols 	],	
			data: task_set_with_comments,
			projects_set:projects_set,
			users:users_set
}


return webix.require({
			"https://cdn.webix.com/pro/edge/kanban/kanban.js"	:true,
			"https://cdn.webix.com/pro/edge/kanban/kanban.css"	:true
		}).then(() => config);

}

Hello @fatid,

I try to use kanban with types in WebixJet app. But when i try to register types, i always get fail that is “Cannot read property ‘$protoWait’ of undefined”.

Considering the example above, the issue is coming from the reference to the webix.ui.kanbanlist component before it is fetched from the CDN (basically, that component does not exist at the moment of calling the webix.type method). As a possible solution, you can move the type declaration inside of a callback function, executing the code after the required resources have been pulled. Please take a look at the following example: https://snippet.webix.com/m7jo84zb.

With that said, the use of require does not seem warranted in this case and goes against our recommendations when it comes to including the sources into your project. Generally, we recommend including the sources via the <script\> tag - the library will work faster due to caching, and your development toolchain will work faster as well.