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
This error also occurs on my library version "react-grid-layout": "1.4.2"
I think the library "react-grid-layout" uses "react-draggable" under the hood
I can't update the library to the latest version
What should I do?
When can I expect the error to be fixed?
Fixed as of 4.6.0. The build moved to tsup with target: es2019, which compiles ?. and ?? down. build/cjs/cjs.js in 4.7.2 contains neither. Upgrade to 4.7.2 and remove the resolutions pin.
Activity
qiaowenjiong commentedon Jun 26, 2025
可选链操作这部分代码没有被压缩
heningyuan6256 commentedon Jun 26, 2025
rodchen-king commentedon Jun 26, 2025
这种改动应该切换大版本吧,不然影响有点多。
rodchen-king commentedon Jun 26, 2025
关键引用关系是:引用的react-resizable,react-resizable引用的react-draggable。期望可以在重新发个包处理这个问题。做的改动切换到大版本。
处理方案是暂时是锁定了这个包版本。
heningyuan6256 commentedon Jun 26, 2025
主工程下package
"resolutions": {
"react-draggable": "4.4.4"
}
就可以解决
cervotoc commentedon Jun 30, 2025
When can I expect a fix? Would it be possible to unpublish 4.5.0?
RED523 commentedon Jul 2, 2025
对,幽灵依赖。先锁版本解决。
oleg88mo commentedon Jul 3, 2025
This error also occurs on my library version "react-grid-layout": "1.4.2"
I think the library "react-grid-layout" uses "react-draggable" under the hood
I can't update the library to the latest version
What should I do?
When can I expect the error to be fixed?
Simple demo of my component:
import RGL, { WidthProvider } from 'react-grid-layout';
import './css/grid-layout.css';
import './css/grid-layout-resizable.css';
const ReactGridLayout = WidthProvider(RGL);
export default function Dashboards() {
return (
<>{useMemo(() => {
return (
<ReactGridLayout layout={dashboars} onLayoutChange={onLayoutChange} onDragStop={onDragStop} onResizeStop={onResizeStop} cols={cols || 10}>{dashboars.map(item=> {return (<divkey={item.id}data-grid={item}>// *** content here);})}
);
}, [dashboars])}
</>
);
}
Dashboard item example what I'm using in data-grid={item} is:
const item = {
w: 6,
h: 3,
maxW: 8,
maxH: 4,
minW: 4,
minH: 2,
static: false,
name: 'Name',
x: 0,
y: 0,
};
STRML commentedon Sep 27, 2026
Fixed as of 4.6.0. The build moved to tsup with
target: es2019, which compiles?.and??down.build/cjs/cjs.jsin 4.7.2 contains neither. Upgrade to 4.7.2 and remove theresolutionspin.