Skip to content

Cannot read properties of undefined (reading 'destroy') on live reload #227

Closed
@IanBoyte

Description

@IanBoyte

Running locally, whenever a live reload occurs, ex. after updating a css module file, the following error occurs:

Unhandled Runtime Error
TypeError: Cannot read properties of undefined (reading 'destroy')

Call Stack

ParallaxProvider.componentWillUnmount
node_modules/react-scroll-parallax/dist/react-scroll-parallax.esm.js (412:0)

callComponentWillUnmountWithTimer
node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (19660:0)

The following is our implementation of the ParallaxProvider:

'use client';

import { ParallaxProvider, useParallaxController } from 'react-scroll-parallax';


export default function Providers({ children }) {
	return (
		<ParallaxProvider>
			<Cursor />
			{/* <FixParallaxScrollEvent /> */}
			{children}
		</ParallaxProvider>
	);
}

"next": "13.4.9", (downgraded due to issue seen here)
"react": "18.2.0",
"react-dom": "18.2.0",
"react-intersection-observer": "^9.5.2",
"react-scroll-parallax": "^3.4.2",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions