reactjs / react-transition-group

An easy way to perform animations when a React component enters or leaves the DOM
https://reactcommunity.org/react-transition-group/
Other
10.1k stars 652 forks source link

Can't Resolve React-Transition-Group #848

Open JuliusGoddard opened 1 year ago

JuliusGoddard commented 1 year ago

When using Material-UI / React-Bootstrap or any other styles on React. The error "Can't resolve 'react-transition-group/Transition' in 'C:\Users\xxxxx\Documents\Web Development\bloglist-frontend\node_modules\react-bootstrap\esm'" comes up when trying to import any component.

How can this bug be worked around or fixed?

koba04 commented 1 year ago

What version of react-transition-group are you using?

JuliusGoddard commented 1 year ago

I tried v2 (the most recent one) and when that didn't work I downgraded to v1 and that didn't work either.

koba04 commented 1 year ago

Could you create a repository or CodeSandbox project so that I can confirm the error?

JuliusGoddard commented 1 year ago

In trying to run npm run build to create a repository... I got the same error again!: Can't resolve 'react-transition-group/Transition' in 'C:\Users\xxxxx\Documents\Web Development\bloglist-frontend\node_modules\react-bootstrap\esm'"

So I can't even create a repository for you because of this error.

JuliusGoddard commented 1 year ago

It took a long, long time to create this repository due to numerous errors along the way.

If you have the time, could you take a look and see if you could spot the problem?

https://github.com/JuliusGoddard/bloglist-frontend

tylerlazenby commented 1 year ago

I am getting this error too. Currently My version is resolving with the declaration "^1.2.1".

I am using this as an example in my project

import React from "react";
import Bar from "./Bar";
import {CSSTransitionGroup} from "react-transition-group";

export default class Foo extends React.Component
{
    render = () => {
        return (
        <div>
            <CSSTransitionGroup
                  transitionName="example"
                  transitionEnterTimeout={500}
                  transitionLeaveTimeout={300}>
                  <Bar/>
        </CSSTransitionGroup>
        </div>
       );
    }
}
pak11273 commented 1 year ago

@byuilazenbyt Try version ^2.0.1