diegomura / diegomura/react-pdf

PDFDownloadLink does not create href in the Download button

Open
#2,634 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
16.8k
Forks
1.3k
Avg merge
5h 6m
Merged PRs (30d)
52

Description

My code works like charm in the dev box, but after deploying it to the prod box, I see a "TypeError: a is not a function",
Not sure what this means and need help. Attached the error image.
using
"@react-pdf/renderer": "^3.3.4",
and in "resolutions": {
"@react-pdf/layout": "3.6.2",
"@react-pdf/pdfkit": "3.0.2",
"@react-pdf/image": "2.2.1"
},
I am doing this.
Component:

import { PDFDownloadLink, Document,View, Text, Page } from '@react-pdf/renderer';
<Document>
<Page>
<View>
<Text>test doc</Text>
</View>
</Page>
</Document>

PDFDownloadLink in another component:
} fileName="somename.pdf">
{({ blob, url, loading, error }) =>
loading ? 'Loading document...' : 'Download now!'
}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.