Skip to content

Local build fails due to conflicting peer dependencies #449

@planger

Description

@planger

With npm version 8.19.4, I get the following errors when running npm install:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: gatsby-remark-autolink-headers@4.0.0
npm ERR! Found: gatsby@2.23.3
npm ERR! node_modules/gatsby
npm ERR!   gatsby@"^2.13.3" from the root project
npm ERR!   peer gatsby@"^2.0.0" from babel-plugin-remove-graphql-queries@2.9.5
npm ERR!   node_modules/babel-plugin-remove-graphql-queries
npm ERR!     babel-plugin-remove-graphql-queries@"^2.9.5" from gatsby@2.23.3
npm ERR!     babel-plugin-remove-graphql-queries@"^2.9.5" from gatsby-plugin-typescript@2.4.6
npm ERR!     node_modules/gatsby-plugin-typescript
npm ERR!       gatsby-plugin-typescript@"^2.4.6" from gatsby@2.23.3
npm ERR!       1 more (gatsby-admin)
npm ERR!   9 more (gatsby-admin, gatsby-interface, gatsby-plugin-emotion, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer gatsby@"^3.0.0-next.0" from gatsby-remark-autolink-headers@4.0.0
npm ERR! node_modules/gatsby-remark-autolink-headers
npm ERR!   gatsby-remark-autolink-headers@"^4.0.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: gatsby@3.15.0
npm ERR! node_modules/gatsby
npm ERR!   peer gatsby@"^3.0.0-next.0" from gatsby-remark-autolink-headers@4.0.0
npm ERR!   node_modules/gatsby-remark-autolink-headers
npm ERR!     gatsby-remark-autolink-headers@"^4.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.

Looks like we have conflicting peer dependencies. The build works, if I ignore peer dependency issues by running npm install --legacy-peer-deps instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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