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.
相关问题
- How to toggle on Order in ReactJS
- Refreshing page gives Cannot GET /page_url in reac
- Adding a timeout to a render function in ReactJS
- React Native Inline style for multiple Text in sin
- Issue with React.PropTypes.func.isRequired
相关文章
- Why would we use useEffect without a dependency ar
- Is it possible to get ref of props.children?
- Stateless function components cannot be given refs
- @angular-cli install fails with deprecated request
- React testing library: Test attribute / prop
- React/JestJS/Enzyme: How to test for ref function?
- Material-UI [v0.x] RaisedButton on hover styles
- Remove expo from react native
Some things you could try:
react
andreact-dom
inside thenode_modules/
foldernode_modules/
and reinstall it again to remove any stall dependenciesIssue:
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 onenode_module
andpackage.json
files and folders which caused the clash.To resolve:
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.
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.