Sample Height type error: computeMaximumLevelAtPosition type error

So it appears my terrain is loading correctly:
const local = new Cesium.Terrain(Cesium.CesiumTerrainProvider.fromUrl(“http://localhost/terrain”));
viewer contains the terrain: local

My function to lookup is:
function foo() {
const positions = [
Cesium.Cartographic.fromDegrees(-85.33, 32.33),
Cesium.sampleTerrainMostDetailed(local, positions).then((updatedPositions) => {
// positions[0].height
// updatedPositions is just a reference to positions.



returns: TypeError: Cannot read properties of undefined (reading ‘computeMaximumLevelAtPosition’)