Skip to content

Error after upgrade to v4.0 #65

@clementizard

Description

@clementizard

Hello!
I have an issue after the v4 upgrade regarding dom-helpers: Cannot find module 'dom-helpers/util/requestAnimationFrame'

Here is my config:
react: 16.10.1
react-css-transition-replace: 4.0.0

I tried to install dom-helpers (v5.1.0) but it didn't changed. After that i've searched in your package.json and found you already use it.

So i ran through their package and found out there is no "utils" folder. It seems to be renamed to "dom-helpers/animationFrame" and has to be used like:
"animationFrame.request(cb) returns an ID for canceling"

I did the change in the ReactCssTransitionReplace.js file, and there is another error occuring: "Cannot find module 'dom-helpers/class/addClass'"

I guess this is the same error pattern as the previous one, but i have to go to work so i can't continue to investigate on this for now.

In the meantime if you have an idea on how to fix that, i'd appreciate it :)

Anyway, cheers for the excellent work!

EDIT:
So i continued to change imports to match files of dom-helpers package, ended up with something like this in ReactCssTransitionReplaceChild.js:

import addClass from 'dom-helpers/addClass'
import removeClass from 'dom-helpers/removeClass'
import animationFrame from 'dom-helpers/animationFrame'
import transitionEnd from 'dom-helpers/transitionEnd'

And removed line 21 to 23. I'm not sure about TransitionEnd, as it completely delete animationEnd event.

Anyway, it does compile... until dom-helpers uses "window" and breaks my ssr.

So i'm rolling back to 3.0.3 until we solve this issue.

EDIT 2:
Possible solution: maybe rollback dom-helpers to the last working version (^3.3.1)?

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