question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Cannot upgrade to React 18

See original GitHub issue

Describe the bug

Cannot upgrade to React@18.0.0 because there is a peerDependency to @storybook/core-common@6.4.22. If this was upgraded to version 6.5.0-alpha.64 this would fix support for React 18 peerDependency

Steps to reproduce the behavior

  1. Apply react 18 as dependency
  2. Watch the npm install fail

Expected behavior

Storybook to work successfully with React 18 and Vite

Screenshots and/or logs

Skjermbilde 2022-04-19 kl  09 02 53 Skjermbilde 2022-04-19 kl  09 13 17

Environment

  • OS: Mac OS Catalina v12.3.1
  • Node.js version: 16.3.1
  • NPM version: 8.1.2

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
IanVScommented, Apr 19, 2022

Alpha versions do not work well with peer deps and npm. I suggest using npm install --legacy-peer-deps

0reactions
IanVScommented, Apr 19, 2022

It sounds like maybe some old transitive deps might have been causing problems. You could try removing your lockfile and reinstalling. And webpack is still used to build the manager, even with the vite builder for the preview. If you want to wait for 6.5 to go stable before updating, it shouldn’t be long.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug: React 18 types broken since the type release a ... - GitHub
For errors in node_modules I'm currently working on an approach that restores as much of the React 17 types behavior as possible (see ......
Read more >
How to Upgrade to React 18
In this post, we will guide you through the steps for upgrading to React 18. Please report any issues you encounter while upgrading...
Read more >
Why React 18 Broke Your App - CoderPad
React 18's internal changes improved a lot, but may have broken your app in the process. Here's why and how you can fix...
Read more >
Upgrading to react@18 and react-dom@18 fails
So, I went back and created a brand new app with npx create-react-app react18 --template typescript . It now wants react@18 and react-dom@18...
Read more >
How to Upgrade to React 18 - How-To Geek
In this article, we'll show you how to upgrade your existing codebases to React 18. Bear in mind that this guide is only...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found