ol.tilegrid.TileGrid error

I am getting an error as below:

Unhandled Promise rejection: Cannot read property ‘length’ of undefined ; Zone: ; Task: Promise.then ; Value: TypeError: Cannot read property ‘length’ of undefined

This error comes up at my below line of code :

var customGrid = new ol.tilegrid.TileGrid({

)}

It seems my app does not recognize TileGrid.

How to solve it ?

Unfortunately, TileGrid is not a Cesium object and is instead part of the OpenLayers API. So someone from openlayers will have to help you with this. They send everyone to their stackoverflow label for questions so you will most likely have better luck asking there: https://stackoverflow.com/questions/tagged/openlayers

Sorry I don’t have a better answer for you.