react-draggable icon indicating copy to clipboard operation
react-draggable copied to clipboard

Critical 4.4.6 Bug: Module parse failed: Unexpected token (78:10)

Open apwelsh opened this issue 2 years ago • 3 comments
trafficstars

Using react-data-grid, which depends on react-resizable, which depends on react-draggable Since your update to 4.4.6, react-data-grid and react-sizable are now broken, and cannot be compiled into our projects.

Error reported is:

in ./node_modules/_react-draggable@4.4.6@react-draggable/build/cjs/Draggable.js Module parse failed: Unexpected token (78:10) You may need an appropriate loader to handle this file type. | y: position.y, | prevPropsPosition: { | ...position | } | };

There is another bug report on the same issue, but it it not receiving any attention, so I opened up another with specifics on my issue

apwelsh avatar Oct 15 '23 23:10 apwelsh

Version 4.4.6 introduced multiple ... syntaxes in the build results, which caused incompatibility issues with lower version browsers.

image

image

image

micate avatar Nov 15 '23 02:11 micate

Although browsers that do not support the ... syntax are too old, this change should be a major version upgrade rather than a minor version change.

micate avatar Nov 15 '23 02:11 micate

This was under the latest build of chromium. It's not a browser issue. In fact, react builds use the node compiler to implement all the latest features on nearly every browser, so again, that isn't the issue. This is simply bad code that breaks core react components that rely on this code.

apwelsh avatar Nov 15 '23 04:11 apwelsh

what is the solution for this?

bhargaviurs avatar Jul 11 '25 20:07 bhargaviurs