Skip to content

Add React ^17.0.0 as peer dependency to support Gatsby v3 and "gatsby-plugin-netlify-cms": "^5.0.0" #5111

@phipag

Description

@phipag

Describe the bug
With the release of Gatsby v3 and "gatsby-plugin-netlify-cms": "^5.0.0" the move to React 17 has been made. netlify-cms-app however requires React 16 as peer dependency. This is a request to add React 17.

To Reproduce

  1. Include gatsby-plugin-netlify-cms": "^5.0.0", and "netlify-cms-app": "^2.14.29" to your package.json
  2. Make sure you are on npm >=7.0 as this uses the new peer dependency resolution
  3. Run npm install

Expected behavior

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: gatsby-i18n@0.1.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR!   react@"^17.0.1" from the root project
npm ERR!   peer react@"^16.9.0 || ^17.0.0" from gatsby-plugin-netlify-cms@5.0.0
npm ERR!   node_modules/gatsby-plugin-netlify-cms
npm ERR!     gatsby-plugin-netlify-cms@"^5.0.0" from the root project
npm ERR!   2 more (gatsby, react-dom)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.4" from netlify-cms-app@2.14.29
npm ERR! node_modules/netlify-cms-app
npm ERR!   netlify-cms-app@"^2.14.29" from the root project
npm ERR!   peer netlify-cms-app@"^2.9.0" from gatsby-plugin-netlify-cms@5.0.0
npm ERR!   node_modules/gatsby-plugin-netlify-cms
npm ERR!     gatsby-plugin-netlify-cms@"^5.0.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Current workaround
Use the npm --legacy-peer-deps flag and install by npm install --legacy-peer-deps

Metadata

Metadata

Assignees

No one assigned

    Labels

    ssg: gatsbytype: featurecode contributing to the implementation of a feature and/or user facing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions