timolins / react-hot-toast

Smoking Hot React Notifications 🔥
https://react-hot-toast.com
MIT License
9.4k stars 309 forks source link

TypeError: goober.keyframes is not a function #170

Open Jared-Dahlke opened 2 years ago

Jared-Dahlke commented 2 years ago

react-hot-toast version 1.0.1

I am getting this error when I try to run a test on a file that uses react-hot-toast TypeError: goober.keyframes is not a function

jose-cabrera commented 2 years ago

Hi! did you have any advance with this?

ppanthony commented 2 years ago

Not a great solution - but a solution none the less:

jest.mock("react-hot-toast", () => ({
  Toaster: () => <>test</>,
}));
bulatkhayrullin commented 1 year ago

@jdbtc You can downgrade goober manually in yarn.lock || package-lock file to version “2.0.41” but I don't know what side effects you will have

timolins commented 1 year ago

Is this issue still present in the 2.3.0?

ppanthony commented 1 year ago

@timolins - yep, I've just upgraded there and re-ran my test suite. y.keyframes is not a function is the error now.

LeoMacherla commented 1 year ago

I'm having the same issue

'y.keyframes is not a function'

nickgros commented 1 year ago

Also experiencing this in a webpack bundle. Using yarn, I added to my package.json resolutions field as a workaround:

  "resolutions": {
    "goober": "2.1.9",
    "react-hot-toast": "2.2.0"
  }
marcebdev commented 1 year ago

Is there any visibility on this? Not being able to test any pages/components with toasts on prod apps seems like a pretty big deal

Abdullah527382 commented 4 weeks ago

Downgrading to "react-hot-toast": "^2.2.0", from v2.4.1 (current latest) worked for me