React Invariant thrown during Next.js `next build`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 28/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- build-system, frontend
Research direction
Start by reproducing the dependency tree with npm ls react and the failing Next.js next build, then compare the npm and Yarn installs. Inspect react-simple-code-editor/package.json and the referenced PR #89 concerning React 17 peer dependencies. Done means the build no longer throws the React invariant with compatible React versions resolved.
Written by the indexing model from the issue text.
Description
With, npm ls react you can see react@16.14.0 is not deduped, and everything else is on react@17.0.2
...
├─┬ react-dom@17.0.2
│ └── react@17.0.2 deduped
...
├─┬ react-live@2.4.0 (...same issue w/ 2.3.0)
│ ├─┬ prism-react-renderer@1.2.1
│ │ └── react@17.0.2 deduped
│ └─┬ react-simple-code-editor@0.11.0
│ ├─┬ react-dom@16.14.0 <-----------------not deduped
│ │ └── react@16.14.0 deduped
│ └── react@16.14.0 <-----------------not deduped
...
├── react@17.0.2
...
I believe this is preventing my Next.js project from building, due to the more than one copy of React React invariant.
... strangely it only happens when installing everything w/ npm and not yarn
Side: react-simple-code-editor https://github.com/satya164/react-simple-code-editor/blob/master/package.json#L62-L65 doesn't specify react/-dom 17 as a peer dependency. (It also hasn't seen a new update in close to 2 years now :/)
Update: Opened a PR to allow react 17 as a peerDep
- Dominant language
- TypeScript
- Stars
- 4.6k
- Forks
- 260
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from FormidableLabs/react-live
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
FormidableLabs/react-live#419 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
FormidableLabs/react-live#417 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 68/100
FormidableLabs/react-live#415 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 52/100
FormidableLabs/react-live#413 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
FormidableLabs/react-live#411 · 1 comment ·
All issues in FormidableLabs/react-live
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ontola/atomic-server#1625 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
melgarafael/DeskcommCRM#1451 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
bug via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bot:ai-assisted component:compact-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
midnightntwrk/midnight-sdk#403 ·