title: Errors : Cannot use import statement outside a module THREE.OrbitControl
body: <p>Im starting with three.js. After trying to implement orbit controls i have some errors. It looks simple but i cannot find a good solution for my errors. When im trying to implement controls like : </p>
  
  <p><code>var controls = new THREE.OrbitControls(camera, renderer.domElement);</code></p>
  
  <p>im getting these errors</p>
  
  <p><a href="https://i.stack.imgur.com/pVPs7.png" rel="nofollow noreferrer">Cannot use import statement outside a module and THREE.OrbitControls is not a constructor</a></p>
  
  <p>I added both threejs and orbitcontrols just before starting a new script. What am I doing wrong here?</p>
  
  <pre><code>
          &lt;script src="scripts/three.js"&gt;&lt;/script&gt;   
          &lt;script src="scripts/OrbitControls.js"&gt;&lt;/script&gt;
  
          &lt;script type="text/javascript"&gt;
                  var scene = new THREE.Scene();
  
                  var camera = new
                  THREE.PerspectiveCamera(75,window.innerWidth/window.innerHeight, 0.1, 1000);
  
                  var renderer = new THREE.WebGLRenderer();
                  renderer.setSize(window.innerWidth, window.innerHeight);
                  renderer.setClearColor(0x888888,1)
                  document.body.appendChild(renderer.domElement);
  
                  var controls = new THREE.OrbitControls(camera, renderer.domElement);
  
  
  
  
  
  
  </code></pre>