TanStack / table

🤖 Headless UI for building powerful tables & datagrids for TS/JS - React-Table, Vue-Table, Solid-Table, Svelte-Table
https://tanstack.com/table
MIT License
24.61k stars 3.04k forks source link

hello world example gives multiple errors, starting with "Can't resolve 'crypto' " #5480

Closed francis-vila closed 1 month ago

francis-vila commented 3 months ago

TanStack Table version

both ^7.8.0 and ^8.15.3

Framework/Library version

^18.2.0

Describe the bug and the steps to reproduce it

I created a new app with create-react-app then tried creating a minimal table with examples from the documentation.

I tried different examples, the ones in codeSandBox being from https://react-table-v7-docs.netlify.app/docs/quick-start .

2 sandboxes: https://codesandbox.io/p/sandbox/7-8-0-react-table-hello-world-l8jytv?file=%2Fpackage.json https://codesandbox.io/p/sandbox/8-15-3-react-table-hello-world-4cww47?file=%2Fsrc%2FApp.js

I either get a blank page, or multiple errors, depending on the versions of react-table and other modules. I received the errors on Windows 11, from a basic installation of create-react-app, with version 18.2.0 of react. (I can't reproduce that in codesandbox. )

I have attempted multiple solutions found on StackOverflow, such as using react-app-rewired with a config-overrides.js file , installing-uninstalling modules, reverting to version 4 of react-scripts, etc.

With "@tanstack/react-table": "^8.15.3" on vscode, I get errors such as the one below.

Module not found: Error: Can't resolve 'crypto' in 'C:\projects\react_2024_3\node_modules\crypto-extra\dist' BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you need to:

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://codesandbox.io/p/sandbox/7-8-0-react-table-hello-world-l8jytv?file=%2Fpackage.json

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

None

Terms & Code of Conduct

KevinVandy commented 1 month ago

All private sandboxes that I cannot see... This very likely has nothing to do with React Table and instead is a misconfiguration with your react setup