score:0
The issue is caused by npm 7's exciting new feature that automatically installs peer dependencies. This results in both React 16 and React 17 being installed which makes everything explode.
Fortunately you can opt out of the new functionality with:
npm install --legacy-peer-deps
It's less exciting but on the plus side it works.
score:1
React Styleguidist has a peer dependency of "react": ">=16.8"
. I'm assuming that prior to installing react-styleguidist, you ran npm install --save-dev react
, and that would have installed react@17.x.
You have two choices:
Downgrade to React@16.x
Look at the updates in the changelog or in the summary blog post. If you don't see any must-have changes and are more concerned about the conflicts, downgrade to resolve the peer dependency issue.
Install the peer dependencies anyway
npm 7.x
has more strict error handling for peer dependency issues, and I was able to install these packages onnpm 6.x
in a React@17 app with no problem, but my colleague hit the same issue and was able to bypass it withnpm install --force
. Run that and it should work fine. I haven't had any issues yet and have been happily ignoring what is a mere warning on my npm version.
Source: stackoverflow.com
Related Query
- How can I get React styleguidist to install correctly and get past the peer Dependency issues with react-simple-code-editor: React 16 & 17?
- How can I get the value of an input field and use it in URL in React
- How can I use React context to get the router exactly and only where I need it?
- how can I get the first unique ID element and last unique ID element in an array React js
- How can I iterate through a dictionary in React to get the values separately and display using html?
- React - How can I get the values from my multiple input and send them to my input?
- How can I get the position right and bottom in React
- How can I get the value of an element onClick in React and use it as condition
- How can I change the scroll direction in React js using javascript and get the scroll variables
- How can I get the device's ip on React Native?
- Suddenly React cannot execute the 'create-react-app' command. Why is this happening and how can I solve it?
- How can I get a variable from the path in react router?
- react - how do I get the size of a component child elements and reposition them
- How can I get TypeScript to type-check the spread operator in React props?
- How can I start my node server and react app at the same time?
- How can I pass CSS classes to React children and ensure they will override the child’s local class?
- How can mock the value of a state and data in my react test
- React and NextJS: How can i detect the Location of my Client?
- How can I cache data that I already requested and access it from the store using React and Redux Toolkit
- How to get the first and last visible date in React Big Calendar?
- How can I get the value from an animated or interpolated value in React Native?
- How to properly make a GET call in React returning an observable (resembling the method in Angular and not using promises)?
- How can i get the location of the user - Using at React Map GL
- I can not get the state from react router Link component using useLocation. So how can I pass it?
- How can I use useEffect in React to run some code only when the component first mounts, and some other code whenever an event occurs (repeatedly)?
- How do I get my HTML form date input to only allow specific days of the week to be chosen using JavaScript, React and HTML?
- How do I correctly add data from multiple endpoints called inside useEffect to the state object using React Hooks and Context API?
- How can i get access to the current user inside of react from firebase?
- How can I get a full working example with React 0.14 and Typescript 1.6.2 and Rails 4.2
- Django Rest Framework and React Front End: How to prevent unauthorized users from viewing private images if they get a hold of the image URL?
More Query from same tag
- React/JavaScript: Using React spread to performing 2 changes(at the same time) on array
- Linking a Bootstrap Navbar correctly with nextjs
- ReactJS + flux - how to handle session-like parameters (pseudoauthorization)
- Problem adding to favorites with React Firebase
- High frequency counter in Reactjs
- Template literal for object identifier
- View files from s3 even after they have private access
- React useEffect has missing dependencies
- How to zoom in and out an image every second?
- DetailsList - Display a message when empty
- React component type in TypeScript
- How to reuse a list component with add/delete functions for other lists with React.js
- Unable to refresh svg chart on Data Change
- fetch api call data is not defined
- I have to click the display button twice to render the data to the screen?
- Is there a way to create a button with a linear progress within it, using material-ui?
- react Private Route
- Jest mock an import from a utility file
- React map not rendering array but console.logs
- The second time onChange is triggered, custom component does not update
- How to Add a Dialog/Modal in a Card in Material UI?
- How to destroy root Preact node?
- React App ignores NODE_ENV of the production mode
- Displaying sum of number inputs after click(react.js)
- REACT - Composition of a component with subcomponents in TypeScript
- Google One Tap SignIn Popup not showing
- Make a React-video Cover the Parent Container? (react-player)
- Blueprintjs Select keyboard navigation not working - React
- get image through axios how to display on my react project
- Cant we pass state to reactchart databar:datasets:data?