Skip to content

React Invariant thrown during Next.js next build #278

@thiskevinwang

Description

@thiskevinwang

With, npm ls react you can see [email protected] is not deduped, and everything else is on [email protected]

...
├─┬ [email protected]
│ └── [email protected] deduped
...
├─┬ [email protected]    (...same issue w/ 2.3.0)
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ └─┬ [email protected]
│   ├─┬ [email protected] <-----------------not deduped
│   │ └── [email protected] deduped
│   └── [email protected] <-----------------not deduped
...
├── [email protected]
...

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions