title: Getting Parsing error: Unexpected token, expected ";"
body: <p>I'm working on a big <code>React + TypeScript</code> project.</p>
  
  <p>It works well on the local machine of other colleagues, but on mine I get the following error:</p>
  
  <pre><code>Line 1:  Parsing error: Unexpected token, expected ";"
  </code></pre>
  
  <p>as you can see below:</p>
  
  <p><a href="https://i.stack.imgur.com/vZ8g2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vZ8g2.png" alt="enter image description here"></a></p>
  
  <p>Here is the source code:</p>
  
  <pre><code>export type LoadOfferType = typeof import("../offers/defaultOffer");
  
  export const loadOffer = async (): Promise&lt;LoadOfferType&gt; =&gt; {
    const offerName = process.env.NODE_ENV === "development" ? process.env.REACT_APP_FALLBACK_SITE : "defaultOffer";
  
    /**
     * We use a switch statement instead of ane xpression for the offer path
     * because Webpack throws a critical dependency error when using paths
     * that are not explicitly defined.
     */
    switch (offerName) {
      case "mysite.com":
        return await import("../offers/mysite.com");
      default:
        return await import("../offers/defaultOffer");
    }
  };
  </code></pre>
  
  <p>The commands I ran after cloning the repository were:</p>
  
  <pre><code>$ yarn install
  $ yarn start
  </code></pre>
  
  <p>Here there is some info about my system:</p>
  
  <pre><code>$ node -v
  v12.13.0
  
  $ npm -v
  6.12.0
  
  $ yarn -v
  1.19.1
  </code></pre>
  
  <p>Any idea on how to fix this?</p>
  
  <p>Thanks!</p>