Property 'getUniforms' is undefined but only for specific objects

Hello, I’m having trouble in rendering and adding objects to my scene.

I’m following the format from this example and the THREERoot, Slide and SlideGeometry classes come from this example and are unchanged other than separating them and adding export default.

Below I have provided the objects I’m trying to add to the scene. The Slide objects render and animate correctly but those that I have labelled as FAILS! gives me the following error:

Uncaught TypeError: Cannot read property ‘getUniforms’ of undefined
at r (three.min.js:164)
at be.renderBufferDirect (three.min.js:187)
at q (three.min.js:157)
at m (three.min.js:157)
at be.render (three.min.js:194)
at THREERoot.render (THREERoot.js:48)
at THREERoot.tick (THREERoot.js:41)

I’m confused as to why some objects render and others don’t. I don’t expect anyone to give a perfect answer but could this be related to compatibility issues between different versions of THREE?

import THREERoot from './THREERoot'
import Slide from './Slide'
import {Text} from 'troika-three-text'

window.onload = init;

function init() {

    var root = new THREERoot({
        createCameraControls: !true,
        antialias: (window.devicePixelRatio === 1),
        fov: 80

    root.renderer.setClearColor(0x000000, 0);
    root.renderer.setPixelRatio(window.devicePixelRatio || 1);, 0, 60);

    var width = 125;
    var height = 125;

    // WORKS!
    var slide = new Slide(width, height, 'out');
    var l1 = new THREE.ImageLoader();
    l1.load('images/image.jpg', function(img) {

    // WORKS!
    var slide2 = new Slide(width, height, 'in');
    var l2 = new THREE.ImageLoader();
    l2.load('images/image.jpg', function(img) {


    // WORKS!
    const geometry = new THREE.BoxGeometry(1, 1, 1)
    const material = new THREE.MeshBasicMaterial({color: 0xff0000})
    const mesh = new THREE.Mesh(geometry, material)

    // FAILS!
    const myText = new Text()
    myText.text = 'Hello'
    myText.fontSize = 2
    myText.position.set(0, 0, 0)
    myText.color = 0x2d2d2d
    myText.font = 'fontPath'
    myText.fillOpacity = 1
    myText.maxWidth = 5

    // FAILS!
    const imgTexture = new THREE.TextureLoader().load( 'path' );
    const imgGeometry = new THREE.PlaneGeometry();
    const imgMaterial = new THREE.MeshPhongMaterial({map: imgTexture, color: 0xFFFFFF, opacity: 1});
    imgMaterial.transparent = true
    const imagePlane = new THREE.Mesh(imgGeometry, imgMaterial);
    imagePlane.position.set(0, 0, 0)

The following is the HTML and the scripts included:

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <div id="three-container"></div>
    <script src=""></script>
    <script src="//"></script>
    <script src=""></script>
    <script src=""></script>