title: Jest: SyntaxError: Unexpected token 'export'
body: <p>I added the following in the <code>package.json</code> file:</p>
  <pre class="lang-js prettyprint-override"><code>&quot;scripts&quot;: {
    &quot;test&quot;: &quot;node --experimental-vm-modules node_modules/jest/bin/jest.js&quot;
  },
  &quot;jest&quot;: {
    &quot;testEnvironment&quot;: &quot;jest-environment-node&quot;,
    &quot;transform&quot;: {}
  },
  &quot;type&quot;: &quot;module&quot;,
  </code></pre>
  <p>This should be sufficient <a href="https://jestjs.io/docs/ecmascript-modules" rel="nofollow noreferrer">https://jestjs.io/docs/ecmascript-modules</a></p>
  <p>However, I still have the error:</p>
  <blockquote>
  <p>export {<br>
  ^^^^^^</p>
  <p>SyntaxError: Unexpected token 'export'</p>
  </blockquote>
  <p>The source of the error comes from a dependency:
  <code>node_modules\object-array-utils</code></p>
  <p>The version of Node is v17.4.0</p>