# there are a lot of possible solutions for this problem
1) change es6 to es5 importimport package from'packageName'; ->
var package = require('packageName');
2) change file extension (.js -> .mjs)
3) add "type: module" in package.json
4) add'type="module"'in script tag
//If you already put this and still error.
<scriptsrc="/node_modules/three/examples/jsm/controls/OrbitControls.js"></script>
//Try changing jsm to js
<scriptsrc="/node_modules/three/examples/js/controls/OrbitControls.js"></script>