Uncaught TypeError: THREE.GLTFLoader is not a constructor (“there are questions exactly like this one but the answers didn’t work for me”)

note: I have a renderer, scene, camera but I didn’t include the code because I think it’s unnecessary but if you have to look at it I will edit the post

  import * as THREE from "https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js";
    import { GLTFLoader } from 'https://cdn.jsdelivr.net/npm/[email protected]/examples/jsm/loaders/GLTFLoader.js';

      let loader = new THREE.GLTFLoader();
    loader.load('assets/trash/scene.gltf', function ( gltf ) {
      scene.add(gltf.scene);
    });