STLLoader in Vue.js Error

You use the wrong path to STLLoader. The module version of the loader is in the jsm directory (not js).

import { STLLoader } from 'three/examples/jsm/loaders/STLLoader.js'