title: ReferenceError: Cannot access {variable name} before initialization
body: <p>I updated <code>react-scripts@^4.0.3</code> as well as <code>typescript@~3.7.2</code> to the latest however when I run <code>npm run start</code> I get the following error :</p>
  <blockquote>
  <p>ReferenceError: Cannot access {variable name} before initialization</p>
  </blockquote>
  <p>I'm aware of &quot;Temporal Deadzones&quot; however this app has had no problem with declaring exports for arrow functions like this, in fact, we declare most/all of our functions in this syntax:</p>
  <pre><code>export const someFunc = () =&gt; {}
  </code></pre>
  <p>Now it's only allowing me to export after declaration like this:</p>
  <pre class="lang-js prettyprint-override"><code>function someFunction(){} -or- const someFunction = () =&gt; {}
  
  export { someFunction }
  </code></pre>
  <p><strong>Question:</strong> How can I allow for the export shorthand function expression syntax, with these new package updates?</p>
  <p><strong>Filename:</strong> tsconfig.json</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;compilerOptions&quot;: {
      &quot;target&quot;: &quot;es5&quot;,
      &quot;lib&quot;: [
        &quot;es2015&quot;,
        &quot;dom&quot;,
        &quot;dom.iterable&quot;,
        &quot;esnext&quot;
      ],
      &quot;jsx&quot;: &quot;react&quot;,
      &quot;baseUrl&quot;: &quot;src&quot;,
      &quot;module&quot;: &quot;esnext&quot;,
      &quot;moduleResolution&quot;: &quot;node&quot;,
      &quot;strict&quot;: true,
      &quot;allowJs&quot;: true,
      &quot;noEmit&quot;: true,
      &quot;skipLibCheck&quot;: true,
      &quot;isolatedModules&quot;: true,
      &quot;esModuleInterop&quot;: true,
      &quot;resolveJsonModule&quot;: true,
      &quot;allowSyntheticDefaultImports&quot;: true,
      &quot;forceConsistentCasingInFileNames&quot;: true,
      &quot;noFallthroughCasesInSwitch&quot;: true,
      &quot;emitDecoratorMetadata&quot;: true,
      &quot;experimentalDecorators&quot;: true
    },
    &quot;include&quot;: [
      &quot;src&quot;
    ],
    &quot;exclude&quot;: [
      &quot;./node_modules&quot;
    ],
    &quot;extends&quot;: &quot;./tsconfig.paths.json&quot;
  }
  </code></pre>
  <p><strong>Filename:</strong> tsconfig.paths.json</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;compilerOptions&quot;: {
      &quot;baseUrl&quot;: &quot;./src&quot;,
      &quot;paths&quot;: {
        &quot;@src&quot;: [&quot;*&quot;],
        &quot;@pages&quot;: [&quot;pages&quot;],
        &quot;@pages/*&quot;: [&quot;pages/*&quot;],
        &quot;@hooks&quot;: [&quot;core/hooks&quot;],
        &quot;@hooks/*&quot;: [&quot;core/hooks/*&quot;],
        &quot;@components&quot;: [&quot;core/components&quot;],
        &quot;@components/*&quot;: [&quot;core/components/*&quot;],
        &quot;@containers&quot;: [&quot;containers&quot;],
        &quot;@containers/*&quot;: [&quot;containers/*&quot;],
        &quot;@services&quot;: [&quot;core/services&quot;],
        &quot;@services/*&quot;: [&quot;core/services/*&quot;],
        &quot;@configs&quot;: [&quot;core/configs&quot;],
        &quot;@configs/*&quot;: [&quot;core/configs/*&quot;],
        &quot;@assets&quot;: [&quot;core/assets&quot;],
        &quot;@assets/*&quot;: [&quot;core/assets/*&quot;],
        &quot;@models&quot;: [&quot;core/models&quot;],
        &quot;@models/*&quot;: [&quot;core/models/*&quot;],
        &quot;@store&quot;: [&quot;core/store&quot;],
        &quot;@store/*&quot;: [&quot;core/store/*&quot;],
        &quot;@utils&quot;: [&quot;core/utils&quot;],
        &quot;@utils/*&quot;: [&quot;core/utils/*&quot;],
        &quot;@styles&quot;: [&quot;core/styles&quot;],
        &quot;@styles/*&quot;: [&quot;core/styles/*&quot;]
      }
    }
  }
  </code></pre>
  <p><strong>Filename:</strong> craco.config.js</p>
  <pre class="lang-js prettyprint-override"><code>const CracoAlias = require(&quot;craco-alias&quot;)
  
  module.exports = {
    plugins: [
      {
        plugin: CracoAlias,
        options: {
          source: &quot;tsconfig&quot;,
          baseUrl: &quot;./src&quot;,
          tsConfigPath: &quot;./tsconfig.paths.json&quot;
        }
      }
    ]
  
  
  }
  </code></pre>
  <p><strong>Filename:</strong> package.json</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;name&quot;: &quot;ui&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@craco/craco&quot;: &quot;^6.1.2&quot;,
      &quot;@prettier/plugin-xml&quot;: &quot;^0.12.0&quot;,
      &quot;@testing-library/jest-dom&quot;: &quot;^4.2.4&quot;,
      &quot;@testing-library/react&quot;: &quot;^9.5.0&quot;,
      &quot;@testing-library/user-event&quot;: &quot;^7.1.2&quot;,
      &quot;@types/bootstrap&quot;: &quot;^4.5.1&quot;,
      &quot;@types/classnames&quot;: &quot;^2.2.11&quot;,
      &quot;@types/debug&quot;: &quot;^4.1.5&quot;,
      &quot;@types/jest&quot;: &quot;^24.9.1&quot;,
      &quot;@types/jquery&quot;: &quot;^3.5.5&quot;,
      &quot;@types/lodash&quot;: &quot;^4.14.168&quot;,
      &quot;@types/node&quot;: &quot;^12.19.15&quot;,
      &quot;@types/react&quot;: &quot;^16.14.2&quot;,
      &quot;@types/react-dom&quot;: &quot;^16.9.10&quot;,
      &quot;@types/react-helmet&quot;: &quot;^5.0.16&quot;,
      &quot;@types/react-redux&quot;: &quot;^7.1.15&quot;,
      &quot;@types/react-router-dom&quot;: &quot;^5.1.7&quot;,
      &quot;@types/react-select&quot;: &quot;^3.1.2&quot;,
      &quot;@types/react-table&quot;: &quot;^7.0.27&quot;,
      &quot;bootstrap&quot;: &quot;^4.6.0&quot;,
      &quot;classnames&quot;: &quot;^2.2.6&quot;,
      &quot;core-js&quot;: &quot;^3.12.1&quot;,
      &quot;debug&quot;: &quot;^4.3.1&quot;,
      &quot;file-selector&quot;: &quot;^0.1.19&quot;,
      &quot;husky&quot;: &quot;^4.3.8&quot;,
      &quot;i18next&quot;: &quot;^19.8.4&quot;,
      &quot;immer&quot;: &quot;^6.0.9&quot;,
      &quot;jquery&quot;: &quot;^3.5.1&quot;,
      &quot;lint-staged&quot;: &quot;^10.5.3&quot;,
      &quot;node-sass&quot;: &quot;^4.14.0&quot;,
      &quot;prettier&quot;: &quot;^2.2.1&quot;,
      &quot;react&quot;: &quot;^17.0.2&quot;,
      &quot;react-bootstrap&quot;: &quot;^1.4.3&quot;,
      &quot;react-dom&quot;: &quot;^16.14.0&quot;,
      &quot;react-dropzone&quot;: &quot;^10.2.2&quot;,
      &quot;react-helmet&quot;: &quot;^6.1.0&quot;,
      &quot;react-i18next&quot;: &quot;^11.8.5&quot;,
      &quot;react-redux&quot;: &quot;^7.2.2&quot;,
      &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
      &quot;react-scripts&quot;: &quot;^4.0.3&quot;,
      &quot;react-select&quot;: &quot;^3.1.1&quot;,
      &quot;react-table&quot;: &quot;^7.6.3&quot;,
      &quot;redux-thunk&quot;: &quot;^2.3.0&quot;,
      &quot;typescript&quot;: &quot;~3.7.2&quot;
    },
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;BROWSER=none craco start&quot;,
      &quot;build&quot;: &quot;npm run check &amp;&amp; craco build&quot;,
      &quot;test&quot;: &quot;craco test&quot;,
      &quot;coverage&quot;: &quot;CI=true npm test -- --colors --coverage&quot;,
      &quot;check&quot;: &quot;prettier --check \&quot;src/**/*.{js,jsx,ts,tsx,json,css,scss,md,xml,svg}\&quot;&quot;,
      &quot;format&quot;: &quot;prettier --write \&quot;src/**/*.{js,jsx,ts,tsx,json,css,scss,md,xml,svg}\&quot;&quot;,
      &quot;eject&quot;: &quot;react-scripts eject&quot;
    },
    &quot;browserslist&quot;: {
      &quot;production&quot;: [
        &quot;&gt;0.2%&quot;,
        &quot;not dead&quot;,
        &quot;not op_mini all&quot;
      ],
      &quot;development&quot;: [
        &quot;last 1 chrome version&quot;,
        &quot;last 1 firefox version&quot;,
        &quot;last 1 safari version&quot;
      ]
    },
    &quot;jest&quot;: {
      &quot;coverageReporters&quot;: [
        &quot;text&quot;,
        &quot;html&quot;
      ],
      &quot;moduleNameMapper&quot;: {
        &quot;react-i18next&quot;: &quot;&lt;rootDir&gt;/__mocks__/react-i18next.js&quot;,
        &quot;^file-loader&quot;: &quot;&lt;rootDir&gt;/__mocks__/file-loader.js&quot;
      },
      &quot;resetMocks&quot;: false
    },
    &quot;prettier&quot;: {
      &quot;singleQuote&quot;: true,
      &quot;jsxSingleQuote&quot;: true
    },
    &quot;lint-staged&quot;: {
      &quot;src/**/*.{js,jsx,ts,tsx,json,css,scss,md,xml,svg}&quot;: [
        &quot;prettier --write&quot;
      ]
    },
    &quot;husky&quot;: {
      &quot;hooks&quot;: {
        &quot;pre-commit&quot;: &quot;lint-staged&quot;
      }
    },
    &quot;devDependencies&quot;: {
      &quot;@babel/core&quot;: &quot;^7.14.3&quot;,
      &quot;craco-alias&quot;: &quot;^3.0.0&quot;
    }
  }
  </code></pre>
  <pre><code></code></pre>