Replies: 2 comments 4 replies
-
Same issue here, Trying to figure out what node dependency polyfill (which Webpack has removed in v5) I need to add in order to get react-pdf working again. |
Beta Was this translation helpful? Give feedback.
1 reply
-
This was my solution: yarn add stream-browserify --save Add this to your webpack config via actions.setWebpackConfig({
resolve: {
fallback: {
"zlib": false,
"crypto": false,
"assert": false,
"util": false,
"process": false,
"path": false,
"_stream_transform": require.resolve("readable-stream/lib/_stream_transform.js"),
"_stream_passthrough": require.resolve("readable-stream/lib/_stream_passthrough.js"),
"_stream_readable": require.resolve("readable-stream/lib/_stream_readable.js"),
"_stream_duplex": require.resolve("readable-stream/lib/_stream_duplex.js"),
"_stream_writable": require.resolve("readable-stream/lib/_stream_writable.js"),
},
alias: {
"stream": "stream-browserify",
},
}
}) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Steps to reproduce
use this repo
https://github.com/vsolanogo/gatsby-pdf-error
it works if you use package-working.json as your package.json and you will be able to render and update pdf file.
after moving to v3 build breaks with plenty of errors
Beta Was this translation helpful? Give feedback.
All reactions