Skip to content

TypeError: hoistStatics is not a function #293

Closed
@techwes

Description

This morning on of my production servers spun up and pulled down the latest version of react-cookie and started giving 500s due to the following error:

/var/app/current/node_modules/react-cookie/cjs/withCookies.js:146
return hoistStatics(ForwardedComponent, WrappedComponent);
^
TypeError: hoistStatics is not a function
at withCookies (/var/app/current/node_modules/react-cookie/cjs/withCookies.js:146:10)
at /var/app/current/dist/common/cookies.js:86:92

We were able to successfully resolve the issue by pinning the version of react-cookie we were depending on to the previous version. We are server-side rendered on Node 12 and use Webpack to bundle our client side files. Let me know what other information you might need to debug the issue.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions