react-notion-x icon indicating copy to clipboard operation
react-notion-x copied to clipboard

Polifill problems with React

Open Santiago-Peraza opened this issue 1 year ago • 2 comments

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

Santiago-Peraza avatar Mar 12 '23 21:03 Santiago-Peraza

+1 also getting these errors

fdterr avatar Mar 26 '23 03:03 fdterr

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.

colek319 avatar May 01 '23 19:05 colek319