小编lai*_*j84的帖子

`不能使用来自另一个模块或领域的“__Schema”。` 和使用 ApolloClient 的`复制“graphql”模块`

我有一个带有 ApolloClient 和 Apollo-Link-Schema 的 React 应用程序。该应用程序在本地运行良好,但在我们的临时环境(使用 GOCD)中,我们收到以下错误:

Uncaught Error: Cannot use e "__Schema" 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 …
Run Code Online (Sandbox Code Playgroud)

graphql react-apollo apollo-client graphql-tools apollo-link

4
推荐指数
2
解决办法
2422
查看次数