Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Cannot resolve module 'preact-compat/lib/ReactTransitionGroup' & module ReactFragment #186

Closed
struckm opened this issue Sep 11, 2016 · 3 comments

Comments

@struckm
Copy link

struckm commented Sep 11, 2016

I'm trying to convert an existing React application based on Material-UI http://www.material-ui.com/ and receive the following errors during the build process:

ERROR in .//react-addons-transition-group/index.js
Module not found: Error: Cannot resolve module 'preact-compat/lib/ReactTransitionGroup' in c:\code\TDC\preact\node_modules\react-addons-transition-group
@ ./
/react-addons-transition-group/index.js 1:17-58

ERROR in .//react-addons-create-fragment/index.js
Module not found: Error: Cannot resolve module 'preact-compat/lib/ReactFragment' in c:\code\TDC\preact\node_modules\react-addons-create-fragment
@ ./
/react-addons-create-fragment/index.js 1:17-51

Is this something that is common working with controls built for React?

@developit
Copy link
Member

Hi @struckm!

For the CSSTransitionGroup you should just be able to alias it to preact-css-transition-group.

For CreateFragment, I actually haven't encountered that one yet! I'll take a look at what it does, likely just something we need to shim.

@struckm
Copy link
Author

struckm commented Sep 11, 2016

Thanks for the quick response, the alias worked for transition group but fragment is still an issue. I'm looking at pulling Material-UI out of the project in favor of Material Design Lite since those are already Preact components. Also, I would like to remove preact-compat from the project.

@developit
Copy link
Member

That's a good goal, and it should dramatically reduce the size of your application. Feel free to drop into Gitter if you run into anything on the way!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants