react-grid-layout: (0 , _fastEquals.deepEqual) is not a function
Describe the bug
I have consistently used version 1.3.4, which was the latest version available on npm. However, yesterday I made the decision to fork the project directly from the source and publish it to npm without making any changes. Surprisingly, I encountered an error upon doing so. It appears that a lot has changed since the version I had been using, which was approximately a year ago, as my code worked perfectly fine with version 1.3.4. Additionally, I want to mention that I installed fast-equals@5.0.0. @STRML, do you have any information regarding this issue? Furthermore, I am curious as to why the package is no longer being published on npm.
import { GridContext } from "../Context";
import { WidthProvider, Responsive } from "react-grid-layout";
const ResponsiveReactGridLayout = WidthProvider(Responsive);
export const DnDGrid = (props) => {
const { myGrid, onUpdatingGrid } = useContext(GridContext);
return (
<ResponsiveReactGridLayout
className="layout"
cols={{md: 12, sm: 10, xs: 10}}
breakpoints={{md: 850, sm: 480, xs:400}} /*Min values to trigger*/
rowHeight={props.currentBreakpoint === "sm" ? 90 : 80}
layouts={myGrid.layouts}
onLayoutChange={(_, layouts) => {
if (!props.isLoadingLayout) {
onUpdatingGrid("layouts", layouts);
}
}}
onBreakpointChange={newBreakpoint => {
props.setCurrentBreakpoint(newBreakpoint);
}}
autoSize={true}
compactType={"vertical"}
containerPadding={{xs:[0, 0], sm: [50, 0], md: [50, 50]}}
margin={[20, 20]} /*between boxes in the grid*/
isBounded={props.currentBreakpoint === "xs" ? false : true}
resizeHandles = {["se"]}>
// The error is present also with no boxes.
</ResponsiveReactGridLayout>
)
}
Your Example Website or App
NO APP
Steps to Reproduce the Bug or Issue
Simply build this repo with npm run build and then include it in a simple demo app.
Expected behavior
The library should work fine as the 1.3.4 version.
react-grid-layout library version
Repo at 1ec4481
Operating System Version
macOS
Browser
Chrome
Additional context
All my npm packages:
├── @auth0/auth0-react@2.1.1
├── @craco/craco@7.1.0
├── @fortawesome/fontawesome-svg-core@6.4.0
├── @fortawesome/free-regular-svg-icons@6.4.0
├── @fortawesome/free-solid-svg-icons@6.4.0
├── @fortawesome/react-fontawesome@0.2.0
├── @radix-ui/react-alert-dialog@1.0.4
├── @radix-ui/react-dialog@1.0.4
├── @radix-ui/react-dropdown-menu@2.0.5
├── @radix-ui/react-label@2.0.2
├── @radix-ui/react-popover@1.0.6
├── @radix-ui/react-separator@1.0.3
├── @radix-ui/react-slot@1.0.2
├── @radix-ui/react-tooltip@1.0.6
├── @reach/combobox@0.18.0
├── @react-google-maps/api@2.18.1
├── @tanstack/react-table@8.9.2
├── @testing-library/jest-dom@5.16.5
├── @testing-library/react@13.4.0
├── @testing-library/user-event@13.5.0
├── axios@1.3.6
├── bootstrap-icons@1.10.4
├── bootstrap@5.2.3
├── class-variance-authority@0.6.0
├── clsx@1.2.1
├── cmdk@0.2.0
├── concurrently@8.1.0
├── daisyui@2.51.6
├── deep-equal@2.2.1
├── fast-equals@5.0.0
├── localforage@1.10.0
├── lucide-react@0.236.0
├── react-aws-s3@1.5.0
├── react-bootstrap@2.7.4
├── react-daisyui@3.1.2
├── react-dom@18.2.0
├── react-ga4@2.1.0
├── react-helmet@6.1.0
├── react-joyride@2.5.4
├── react-pdf@7.1.1
├── react-player@2.12.0
├── react-router-dom@6.11.1
├── react-scripts@5.0.1
├── react-sizeme@3.0.2
├── react-textarea-autosize@8.4.1
├── react-youtube@10.1.0
├── react@18.2.0
├── sass@1.62.1
├── source-map-explorer@2.5.3
├── tailwind-merge@1.13.0
├── tailwindcss-animate@1.0.5
├── tailwindcss@3.3.2
├── tripflow-grid@1.0.0 -------> this is my forked version, with NO modifications
├── typed.js@2.0.16
├── typescript@5.1.3
├── use-places-autocomplete@4.0.0
├── web-vitals@2.1.4
└── webpack-bundle-analyzer@4.8.0
Screenshots or Videos
The error is the following:
Inspecting with the Google Chrome console:
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 4
- Comments: 16
Commits related to this issue
- fix(deps): revert fast-equals to @4.0.3 Fixes #1904 — committed to react-grid-layout/react-grid-layout by STRML 10 months ago
- fix(deps): revert fast-equals to @4.0.3 (#1932) Fixes #1904 — committed to react-grid-layout/react-grid-layout by STRML 10 months ago
@STRML Thanks it is fixed now…Really like your support
It’s fixed now, try
1.4.1.I modified the package.json to solve this problem.
me too. when upgrade to 1.4.0
in

build/utils.js