I am trying to update react from 15.4.2 to 16.2.0. Main dependencies I am concerned about is React and React-Dom. I am trying to run: npm uninstall --save react react-dom
and then npm install --save react react-dom
however I keep getting the message: UNMET PEER DEPENDENCY react@16.2.0 react-dom@16.2.0
so this makes me think it's a shrink or tied down dependency but can't seem to find it. I have tried to even remove react and react-dom from the dependencies in package.json. Still no avail.

- 179
- 3
- 11
2 Answers
Issue:
My root issue is I coudn't run material ui components with tap react and more specifically the Tabs and it's touch/tap feature. Real problem is I believe I had other node_modules,package.jsons
in root folder where my app/components were in so more than one node_module
and package.json
files and folders which caused the clash.
To resolve:
- Make a copy of your business logic from app where you cannot update
- Then navigate into/create new directory and Scaffolded new react project in there (react-app or in my case Yo @microsoft/sharepoint)
Checked the react, reactdom versions in node_modules folder and package.json from within the application that's not updating to see if they're latest versions...they weren't so I did the following updates:
3.2.
npm install --save react react-dom
(you may have to runnpm uninstall react react-dom
first)3.3.
npm install material-ui@latest
3.4
npm i --save react-tap-event-plugin@3.0.2
Check if versions have updated in folders above in step 3...they have now.
- Try to import and create tap react app components again e.g. Tabs and now it should work
Conclusion: It was not Shrinkwrap itself that was causing the issue but the duplication of node_module files and/or package.json files. See Material-UI Tabs have stopped working for more info.
Also remember Create React app will not work with some versions of React and React Dom. So be wary of this.

- 179
- 3
- 11
Some things you could try:
- check the version of
react
andreact-dom
inside thenode_modules/
folder - remove
node_modules/
and reinstall it again to remove any stall dependencies

- 1,176
- 16
- 23
-
I have tried that too. Sorry but does this info help: Could be that my app let's say called appA (app.js,package.json,node_modules) lives in a parent folder under but this itself has it's own (src,app.js,package.json,node_modules etc.) and a the class here means for every child (appA,appB) that has (node_modules,package.json) in parent I delete I will still have to amend the parent folder files too?? If so it could be something I overseen as a rookie! – KidKode Feb 06 '18 at 12:13
-
If you know fix please let me know. Until then best idea I have is to create new project OUTSIDE of parent i.e. there will be no node_modules or wrapping files. Then navigate to new project reinstall react,reactdom,materialui etc..all and slowly copying the business logic back in from repo/source control....painful but may be only fix for me. – KidKode Feb 06 '18 at 12:43