不能从另一个模块或领域使用GraphQLSchema“ [object Object]”

问题描述 投票:0回答:1

我收到错误:

无法使用另一个模块中的GraphQLSchema“ [object Object]”或领域。

请确保在其中仅存在一个“ graphql”实例node_modules目录。如果不同版本的“ graphql”是其他依赖模块的依赖关系,请使用“分辨率”来确保仅安装一个版本。https://yarnpkg.com/en/docs/selective-version-resolutions

重复的“ graphql”模块不能同时使用,因为不同的版本可能具有不同的功能和行为。的一个版本中使用的功能版本中的数据可能会产生令人困惑和虚假的结果。

以下是我的package.json

 "dependencies": {
    "@babel/polyfill": "^7.0.0",
    "babel-cli": "^6.26.0",
    "babel-core": "^6.26.3",
    "babel-plugin-transform-object-rest-spread": "^6.26.0",
    "babel-preset-env": "^1.7.0",
    "babel-register": "^6.26.0",
    "bcryptjs": "^2.4.3",
    "cron": "^1.7.2",
    "cross-fetch": "^2.2.2",
    "env-cmd": "^8.0.2",
    "expo-server-sdk": "^3.4.0",
    "graphql": "^0.13.2",
    "graphql-cli": "^2.16.4",
    "graphql-yoga": "^1.14.10",
    "jsonwebtoken": "^8.3.0",
    "nodemailer": "^6.2.1",
    "pg": "^7.14.0",
    "prisma-binding": "^2.1.1",
    "stripe": "^7.1.0"
  },
  "devDependencies": {
    "jest": "^23.5.0",
    "nodemon": "^1.17.5"
  },
  "resolutions": {
    "graphql": "^14.5.8"
  }

我安装了"graphql": "^0.13.2",因为甚至在安装UNMET PEER DEPENDENCY之前都遇到了Cannot use GraphQLSchema "[object Object]" from another module or realm.错误,并且也遇到了"graphql": "^0.13.2"错误>

我尝试运行npm dedupe,但仍未解决。如何解决此错误?

我收到错误:无法从另一个模块或领域使用GraphQLSchema“ [object Object]”。确保在node_modules目录中只有一个“ graphql”实例。如果...

reactjs npm dependencies graphql yarn
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.