title: Attempted import error: 'create' is not exported from 'fontkit' (imported as 'fontkit')
body: <p>I'm using the <code>react-pdf/renderer</code> package to add functionality to download a pdf from my website. But I'm getting this error message: <code>./node_modules/@react-pdf/font/lib/index.browser.es.js Attempted import error: 'create' is not exported from 'fontkit' (imported as 'fontkit').</code></p>
  <p>I tried to use different versions of this package, such as v2.2.0, v2.3.0 and v3.0.0, but unfortunately, nothing worked for me. I'm using <code>react v^17.0.2</code>.</p>
  <p>PDF Document code:</p>
  <pre><code>import { Document, Page, StyleSheet, Text, View } from &quot;@react-pdf/renderer&quot;;
  import React from &quot;react&quot;;
  
  const styles = StyleSheet.create({
    page: {
      flexDirection: &quot;row&quot;,
      backgroundColor: &quot;#E4E4E4&quot;,
    },
    section: {
      margin: 10,
      padding: 10,
      flexGrow: 1,
    },
  });
  
  const InvoicePDF = () =&gt; {
    return (
      &lt;Document&gt;
        &lt;Page size=&quot;A4&quot; style={styles.page}&gt;
          &lt;View style={styles.section}&gt;
            &lt;Text&gt;Section #1&lt;/Text&gt;
          &lt;/View&gt;
          &lt;View style={styles.section}&gt;
            &lt;Text&gt;Section #2&lt;/Text&gt;
          &lt;/View&gt;
        &lt;/Page&gt;
      &lt;/Document&gt;
    );
  };
  
  export default InvoicePDF;
  </code></pre>
  <p>PDF Download button:</p>
  <pre><code>import React from &quot;react&quot;;
  import InvoicePDF from &quot;../invoicePDF/InvoicePDF&quot;;
  import { pdf } from &quot;@react-pdf/renderer&quot;;
  import { saveAs } from &quot;file-saver&quot;;
  
  const InvoiceFooter = ({ data }) =&gt; {
    return (
          &lt;button
            className=&quot;w-full text-white text-sm font-bold px-6 py-4 rounded-full transition bg-borderOne hover:bg-gray-200 hover:text-borderOne&quot;
            onClick={async () =&gt; {
              const doc = &lt;InvoicePDF /&gt;;
              const asPdf = pdf([]);
              asPdf.updateContainer(doc);
              const blob = await asPdf.toBlob();
              saveAs(blob, &quot;document.pdf&quot;);
            }}
          &gt;
            Download PDF
          &lt;/button&gt;
    );
  };
  
  export default InvoiceFooter;
  </code></pre>