Stream: jco

Topic: Why are jco-transpiled components requiring "node:fs"?


view this post on Zulip Leon Thomm (Jan 31 2025 at 10:30):

I'm plying around with jco, and I noticed it seems that recent versions produce bindings for components that include a line

_fs = _fs || await import('node:fs/promises');

which does not work when packaging a web app for a browser environment, webpack will complain. Why is this and how can I avoid it?
Disclaimer: I'm about as far from a web dev as it gets, so pardon me if I'm missing the basics here.

view this post on Zulip Leon Thomm (Jan 31 2025 at 11:22):

ahh, it might be a react issue where these file should be polyfilled

Describe the bug Compiled with problems Did you try recovering your dependencies? yarn --version 1.22.15 Which terms did you search for in User Guide? react-scripts 5 webpack Module not found: Erro...

Last updated: Feb 27 2025 at 23:03 UTC