title: NodeJS 12 SyntaxError: Unexpected token 'export'
body: <h3>What I'm trying to do</h3>
  <p>I'm trying to use the library <a href="https://github.com/phhu/videojs-abloop" rel="nofollow noreferrer">videojs-abloop</a></p>
  <p>My nodejs version is <code>v12.18.3</code></p>
  <h3>What is the problem</h3>
  <p>First I installed two libraries as asked from <a href="https://github.com/phhu/videojs-abloop" rel="nofollow noreferrer">videojs-abloop</a> :</p>
  <pre><code>npm install video.js videojs-abloop
  </code></pre>
  <p>Then ran the command</p>
  <pre><code>$ node --experimental-modules index.js
  </code></pre>
  <p>Error output</p>
  <pre><code>$ node --experimental-modules index.js
  (node:31057) ExperimentalWarning: The ESM module loader is experimental.
  /my_path/testimport/node_modules/videojs-abloop/videojs-abloop.js:8
  export default function (window, videojs) {
  ^^^^^^
  
  SyntaxError: Unexpected token 'export'
  
  </code></pre>
  <h3>What is my project structure</h3>
  <p>I two files : <code>index.js</code> and <code>package.json</code> :</p>
  <p>index.js</p>
  <pre><code>import videojs from 'video.js'
  import abLoopPlugin from 'videojs-abloop'
  
  abLoopPlugin(window,videojs);
  </code></pre>
  <p>package.json</p>
  <pre><code>{ &quot;type&quot;: &quot;module&quot; }
  </code></pre>
  <h3>What I have checked</h3>
  <p>I checked about the ESM imports but <a href="https://thecodebarbarian.com/nodejs-12-imports" rel="nofollow noreferrer">Node.js 12 : ESM Imports</a>, but I think it is not related to this problem</p>