-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: qo is not a function #2978
Comments
same here, happening since i updated to next 15 |
Still getting the same error after updating to the code I'm using to test this'use client'
import { Document, Page, PDFViewer, StyleSheet, Text, View } from '@react-pdf/renderer'
export default function Home () {
return <PDFViewer {...{
style: {
width: '100dvw',
height: '100dvh',
},
}}>
<MyDocument />
</PDFViewer>
}
function MyDocument () {
const styles = StyleSheet.create( {
page: {
flexDirection: 'row',
// backgroundColor: '#E4E4E4',
},
section: {
margin: 10,
padding: 10,
flexGrow: 1,
},
} )
return <Document>
<Page size='A4' style={styles.page}>
<View style={styles.section}>
<Text>Section #1</Text>
</View>
<View style={styles.section}>
<Text>Section #2</Text>
</View>
</Page>
</Document>
} dependencies"dependencies": {
"@react-pdf/renderer": "^4.1.5",
"next": "15.0.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
} full error stack
|
Thanks. I reopened this. I'll investigate as soon as I can |
I'm getting this error too on Next 15. Any idea what triggers this and there's any workaround? |
Same here using next 15 with react 19. Any ideias? |
This error is because of change in state. I fixed it by doing conditional rendering. |
I downgraded the project to Next 14 in the meantime and it stoped the problem, so it is clearly some incompatibility with Next 15 / React 19 |
Could you and a code example of what you mean? |
Same error here. Using NextJS 15.1.0 with stable React 19 version and @react-pdf/renderer: 4.1.5 Edit: Im using the PDFDownloadLink component and mapping data into rows. I encountered this issue when storing the data in a useState. I switched to using Nanostores for state management, and it works fine now. It seems there is a compatibility issue between the library and React's internal state management |
Every time I save I get this error:
TypeError: qo is not a function
Then I have to reload the page and everything works again until I save again.
Here's the full error stack.
The text was updated successfully, but these errors were encountered: