Cannot read properties of undefined (reading 'elements') Line: 1172

So I’m trying to create an object and add it to the scene. The only issue is, the object outputs an error of
Cannot read properties of undefined (reading 'elements') Line: 1172
Whenever I look at where the object is supposed to be. I narrowed the error down to this snippet
FYI, item, pickupMaterial, and position are not undefined as I did print them out and everything looked fine.

function createPickup(position, itemId) {
    const item = itemDict[itemId];
    const pickup = new THREE.Mesh(pickupGeometry, itemDict[itemId].pickupMaterial);
    // alert(`${JSON.stringify(item)}\n${item.thumbnail}`);

    pickup.position.set(position.x, position.y + 0.5, position.z);
    scene.add(pickup);
}

In devtools console you can click the line number on the right hand side to jump to the error line directly - it’ll show you what property it’s trying to read the .elements from.