Skip to content

Graphql plugin duplication #15102

@leon1995

Description

@leon1995

Bug report

Required System information

  • Node.js version: v18.12.1
  • NPM version: 8.19.2
  • Strapi version: 4.5.3
  • Database: sqlite
  • Operating system: macos

Describe the bug

Strapi is not able to run with plugin-graphql plugin. I followed the quick-start guide and the graphql documentation to install the plugin, but the server is not starting anymore.

Steps to reproduce the behavior

  1. Create a new strapi app npx create-strapi-app@latest strapi-test
  2. cd strapi-test
  3. install graphql plugin npm install @strapi/plugin-graphql
    This results in
[2022-12-07 08:49:57.531] debug: ⛔️ Server wasn't able to start properly.
[2022-12-07 08:49:57.533] error: Cannot use GraphQLScalarType "Time" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.
Error: Cannot use GraphQLScalarType "Time" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions