Uncaught SyntaxError: Cannot use import statement outside a module three.js

JavaScript
//If you already put this and still error.
<script src="/node_modules/three/examples/jsm/controls/OrbitControls.js"></script>
//Try changing jsm to js
<script src="/node_modules/three/examples/js/controls/OrbitControls.js"></script>
Source

Also in JavaScript: