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

ModuleNotFoundError in react-addons-update #260

Closed
sudodoki opened this issue Dec 22, 2016 · 4 comments · Fixed by #339
Closed

ModuleNotFoundError in react-addons-update #260

sudodoki opened this issue Dec 22, 2016 · 4 comments · Fixed by #339

Comments

@sudodoki
Copy link

Using

alias: {
            'react': 'preact-compat',
            'react-dom': 'preact-compat'
        }

in existing react app, I get

ModuleNotFoundError: Module not found: Error: Cannot resolve module 'preact-compat/lib/update' in %some-long-path-here%/node_modules/react-addons-update

I'm using react@15.1.0 and react-addons-update@15.1.0.
Do you happen to know whether there's a fix to this issue?

@nilssonan
Copy link

Having the same problem!

@developit
Copy link
Member

react-addons-update is another one of the React internal libs people hotlinked without thinking 👎
It's just a module that points back into the react source, you can see the real code here:
https://unpkg.com/react@15.4.2/lib/update

We'll need to replicate it in preact-compat, which is pretty annoying given it has nothing to do with React at all.

@halfninja
Copy link

react-addons-update has been superceded by a drop-in replacement immutability-helper, so you could add an alias to that in your build.

@developit
Copy link
Member

Yes, also I should add that immutability-helper is amazing and everyone should give it a read-through!

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

Successfully merging a pull request may close this issue.

4 participants