react-notion-x
react-notion-x copied to clipboard
Polifill problems with React
Description
I have a lot of problem with this module. Im trying use in react, when compile, i have multiple BREAKING CHANGE error ( exaclty,23). All errors refer to 'webpack<5 used to include polyfills'
i install all dependecies but the errors persist.
polyfills require: stream, tls, net, http2, http, https, zlib, os, dns
Any idea how to solve it?
i have: webpack : 5.76.1 node: 19.7.0
+1 also getting these errors
Most of these libraries aren't difficult to polyfill, but http2 doesn't seem to have an implementation that can be used as a polyfill. It really makes this library unusable if you running strictly in browser.
The problems are mostly coming through got. It seems like this is meant to run only in a node.js environment anyway, according to this issue.
The way around this is to implement an http2 polyfill, or to run everything in a node environment (server-side rendering would work really well here).
Thoughts on a path forwar? Could we use another http library? They recommend ky for browser. That said, maybe we shouldn't be doing this in browser at all.