@mui/x-data-grid-premium "ReferenceError: atob is not defined" #11046
Labels
bug 🐛
Something doesn't work
component: data grid
This is the name of the generic UI component, not the React module!
feature: Filtering
Related to the data grid Filtering feature
Steps to reproduce
Link to live example: (required)
We just bought MuiPremium and I was able to upgrade our Date-Pickers decently. However, I tried for 3 hours to make a live DataGridPremium example work with node 14.18.2, next 10.1.2, and the newest MUI packages - there are limitations within codesandbox that prevent the docker container for that node version from working. I can provide more elaborate code samples if needed, but I'm not going to waste any more time on a codesandbox when I found where the issue is in MUI's codebase.
Current behavior
next dev
throws "ReferenceError: atob is not defined" when loading a page withDataGridPremium
Expected behavior
it should load a basic datagrid
Context
I saw some other issues mentioning
atob
andeval()
and pieced together that there are checks forwindow.atob
in order to useeval
.The version of Next (which we're stuck with for this project due to being locked on node 14.18) appears to be pre-rendering server side when in development mode in such a way that a package DataGridPremium relies on, gridFilterUtils.ts, is unable to proceed.
(it wouldn't be an issue for production for us, we serve MUI content as wholly statically generated, but watch mode for development is important)
Looks like it was fixed in some other utils but
gridFilterUtils.js
is missing -- a needle in a haystack that this big version-locked project came across.I'd love
next dev
to work without this temp workaround I'm using on gridFilterUtils.ts#L27C76-L27C76...which definitely won't work editing the node_modules file for deployment!
Your environment
npx @mui/envinfo
Search keywords: atob next nextjs node node14
Order ID: 78418
The text was updated successfully, but these errors were encountered: