You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are facing below issue when the webpack is compiling the RGL.
ERROR in ./node_modules/react-grid-layout/build/utils.js 199:74
Module parse failed: Unexpected token (199:74)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| */
| function childrenEqual(a /*: ReactChildren*/, b /*: ReactChildren*/) /*: boolean*/{
> return (0, _fastEquals.deepEqual)(_react.default.Children.map(a, c => c?.key), _react.default.Children.map(b, c => c?.key)) && (0, _fastEquals.deepEqual)(_react.default.Children.map(a, c => c?.props["data-grid"]), _react.default.Children.map(b, c => c?.props["data-grid"]));
| }
Node : 16
NPM:6 where forcing the RGL library version to 1.4.2 is fixing the issue, since there are multiple clients using different versions
of react-grid-layout, we can't request the clients to do force resolutions.
request to share the solution to this issue.
We're hitting this too. The problem is the optional chaining operator (i.e., ?'s) usage in the JS output. Line 360 in ReactGridLayout.js, for example looks like this in 1.4.3:
The former looks like babel output handling an optional in vanilla JS whereas the latter is leaving the optional chaining in. If you're targeting pre-ES2020 (or using an older browser) it will barf on this.
Perhaps this was from the node version switch from 16 -> 18? That looks like the biggest change in the diff: 1.4.3...1.4.4.
Describe the bug
We are facing below issue when the webpack is compiling the RGL.
Babel Config
Node : 16
NPM:6
where forcing the RGL library version to 1.4.2 is fixing the issue, since there are multiple clients using different versions
of react-grid-layout, we can't request the clients to do force resolutions.
request to share the solution to this issue.
Your Example Website or App
https://codesandbox.io/p/sandbox/staging-bush-3lvt7?file=%2Fsrc%2FShowcaseLayout.js
Steps to Reproduce the Bug or Issue
Expected behavior
No Error in webpack build.
react-grid-layout library version
1.4.4, 1.3.4
Operating System Version
macOS,
Browser
Chrome
Additional context
No response
Screenshots or Videos
The text was updated successfully, but these errors were encountered: