webix.promise is undefined

I try to set a pivot table as in the demo on my app.

i did it like this:

pivot_dataset = [
{“name”: “Argentina”, “year”: 2005, “continent”: “South America”, “form”: “Republic”, “gdp”: 181.357, “oil”: 1.545, “balance”: 4.699},
{“name”: “Argentina”, “year”: 2006, “continent”: “South America”, “form”: “Republic”, “gdp”: 212.507, “oil”: 1.732, “balance”: 7.167}
];

    webix.ready(function(){
        grida = webix.ui({
            container:divId,
            view:"pivot",
            height:400,
            width:1000,

            data:pivot_dataset,

            structure: {
                rows: ["form", "name"],
                columns: ["year"],
                values: [{ name:"gdp", operation:"sum"}, { name:"oil", operation:"sum"}],
                filters:[]
            },
            ready:function(){
                var grid = this.$$("data");
                //define coloring rules for the first column
                grid.config.columns[1].cssFormat = function(value){ if (value < 10) return "webix_min"; }
                grid.refresh();
            }
        });

    });

But I get error on the following

this.waitData = webix.promise.defer();

It says that webix.promis is undefined,

Any help would be great.

Which version of webix.js you are using ?

Please use webix.js and pivot.js from the same version. ( you can check versions in the header text of related js file )

v.2.2.1 both.

It is is a pro trial version.

I would add that when I run the demo page locally (the one I took the code from) it works…

Any ideas?

Looks like a timing issue.

When I move the includes of pivot.js , webix.js further up it works.

Unfortunately we wasn’t able to reconstruct the issue.

There are some places in code of promise handling that can cause the problem, we will try to improve them in the next build. Hopefully it will fix your original issue as well