Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Wrongly saying outdated version #813

Closed
marcogreselin opened this issue Jun 14, 2017 · 2 comments
Closed

Wrongly saying outdated version #813

marcogreselin opened this issue Jun 14, 2017 · 2 comments

Comments

@marcogreselin
Copy link

I'm working on a create-react-app app and it says I have an outdated version of React. I made sure to run npm update and have checked the version of the react module and it's 15.6.0. The website is https://marcogreselin.com/ and the code in question is in this repo. What am I doing wrong?

@ngyikp
Copy link
Contributor

ngyikp commented Jun 14, 2017

The extension's warning is correct, your page is loading two copies of React.

Following this diagnosis guide: #692
We can see that there are two React renderers:
screen shot 2017-06-15 at 1 27 05 am

Luckily, source maps are uploaded, making diagnosis much easier.
One way to find the ReactDOM modules is to search for __REACT_DEVTOOLS_GLOBAL_HOOK__.inject(, which shows two results:
screen shot 2017-06-15 at 1 34 25 am
screen shot 2017-06-15 at 1 34 46 am

By looking at the module ID comment that Webpack inserts at the top of each module, we can step through each module:

  • Module ID 242 -> 228 -> 180
    screen shot 2017-06-15 at 1 46 38 am

  • Module ID 344 -> 340 -> 385 -> 141
    screen shot 2017-06-15 at 1 47 09 am

We found the culprit, a third-party component react-typewriter links to an outdated React version using dependencies, it should be linked with peerDependencies instead

https://github.com/ianbjorndilling/react-typewriter/blob/3fa2fcd04b6efb33c94b0fbb11d46dc603c5db9d/package.json#L27

Your solution is to either notify the author or fork the component.

@marcogreselin
Copy link
Author

Oh wow thanks @ngyikp for your help!

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