react-fullstack-graphql icon indicating copy to clipboard operation
react-fullstack-graphql copied to clipboard

Errors on Start Up

Open JamesSingleton opened this issue 7 years ago • 2 comments

Hi All,

So I recently came across this repo and it is awesome! However, when I ran the commands in the README for the advanced version, I got several errors.

Setup:

  • Node Version: 11.1.0
  • NPM Version: 6.4.1
  • Yarn Version: 1.12.3
  • OS: Windows 10 Home

So I ran the command graphql create my-app --boilerplate react-fullstack-advanced which doesn't prompt you to deploy the Prisma service to a public cluster. After I did that, I ran cd my-app/server and then yarn dev / npm run dev which resulted in

Type "Node" is missing a "__resolveType" resolver. Pass false into "resolverValidationOptions.requireResolversForResolveType" to disable this warning.
Server is running on http://localhost:4000
Serving playground at http://localhost:3000/playground
Error: Cannot use GraphQLSchema "[object GraphQLSchema]" 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.
    at instanceOf (D:\Coding\GraphQL\my-app\server\node_modules\graphql\jsutils\instanceOf.js:15:13)
    at isSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\schema.js:52:35)
    at validateSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:55:25)
    at assertValidSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:80:16)
    at Object.validate (D:\Coding\GraphQL\my-app\server\node_modules\graphql\validation\validate.js:57:35)
    at doRunQuery (D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:110:38)
    at D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:21:56
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
Error: Cannot use GraphQLSchema "[object GraphQLSchema]" 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.
    at instanceOf (D:\Coding\GraphQL\my-app\server\node_modules\graphql\jsutils\instanceOf.js:15:13)
    at isSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\schema.js:52:35)
    at validateSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:55:25)
    at assertValidSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:80:16)
    at Object.validate (D:\Coding\GraphQL\my-app\server\node_modules\graphql\validation\validate.js:57:35)
    at doRunQuery (D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:110:38)
    at D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:21:56
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
Error: Cannot use GraphQLSchema "[object GraphQLSchema]" 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.
    at instanceOf (D:\Coding\GraphQL\my-app\server\node_modules\graphql\jsutils\instanceOf.js:15:13)
    at isSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\schema.js:52:35)
    at validateSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:55:25)
    at assertValidSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:80:16)
    at Object.validate (D:\Coding\GraphQL\my-app\server\node_modules\graphql\validation\validate.js:57:35)
    at doRunQuery (D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:110:38)
    at D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:21:56
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
Error: Cannot use GraphQLSchema "[object GraphQLSchema]" 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.
    at instanceOf (D:\Coding\GraphQL\my-app\server\node_modules\graphql\jsutils\instanceOf.js:15:13)
    at isSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\schema.js:52:35)
    at validateSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:55:25)
    at assertValidSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:80:16)
    at Object.validate (D:\Coding\GraphQL\my-app\server\node_modules\graphql\validation\validate.js:57:35)
    at doRunQuery (D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:110:38)
    at D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:21:56
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
Error: Cannot use GraphQLSchema "[object GraphQLSchema]" 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.
    at instanceOf (D:\Coding\GraphQL\my-app\server\node_modules\graphql\jsutils\instanceOf.js:15:13)
    at isSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\schema.js:52:35)
    at validateSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:55:25)
    at assertValidSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:80:16)
    at Object.validate (D:\Coding\GraphQL\my-app\server\node_modules\graphql\validation\validate.js:57:35)
    at doRunQuery (D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:110:38)
    at D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:21:56
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
Error: Cannot use GraphQLSchema "[object GraphQLSchema]" 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.
    at instanceOf (D:\Coding\GraphQL\my-app\server\node_modules\graphql\jsutils\instanceOf.js:15:13)
    at isSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\schema.js:52:35)
    at validateSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:55:25)
    at assertValidSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:80:16)
    at Object.validate (D:\Coding\GraphQL\my-app\server\node_modules\graphql\validation\validate.js:57:35)
    at doRunQuery (D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:110:38)
    at D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:21:56
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
Error: Cannot use GraphQLSchema "[object GraphQLSchema]" 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.
    at instanceOf (D:\Coding\GraphQL\my-app\server\node_modules\graphql\jsutils\instanceOf.js:15:13)
    at isSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\schema.js:52:35)
    at validateSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:55:25)
    at assertValidSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:80:16)
    at Object.validate (D:\Coding\GraphQL\my-app\server\node_modules\graphql\validation\validate.js:57:35)
    at doRunQuery (D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:110:38)
    at D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:21:56
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
Error: Cannot use GraphQLSchema "[object GraphQLSchema]" 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.
    at instanceOf (D:\Coding\GraphQL\my-app\server\node_modules\graphql\jsutils\instanceOf.js:15:13)
    at isSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\schema.js:52:35)
    at validateSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:55:25)
    at assertValidSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:80:16)
    at Object.validate (D:\Coding\GraphQL\my-app\server\node_modules\graphql\validation\validate.js:57:35)
    at doRunQuery (D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:110:38)
    at D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:21:56
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
Error: Cannot use GraphQLSchema "[object GraphQLSchema]" 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.
    at instanceOf (D:\Coding\GraphQL\my-app\server\node_modules\graphql\jsutils\instanceOf.js:15:13)
    at isSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\schema.js:52:35)
    at validateSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:55:25)
    at assertValidSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:80:16)
    at Object.validate (D:\Coding\GraphQL\my-app\server\node_modules\graphql\validation\validate.js:57:35)
    at doRunQuery (D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:110:38)
    at D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:21:56
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
Error: Cannot use GraphQLSchema "[object GraphQLSchema]" 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.
    at instanceOf (D:\Coding\GraphQL\my-app\server\node_modules\graphql\jsutils\instanceOf.js:15:13)
    at isSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\schema.js:52:35)
    at validateSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:55:25)
    at assertValidSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:80:16)
    at Object.validate (D:\Coding\GraphQL\my-app\server\node_modules\graphql\validation\validate.js:57:35)
    at doRunQuery (D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:110:38)
    at D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:21:56
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
Error: Cannot use GraphQLSchema "[object GraphQLSchema]" 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.
    at instanceOf (D:\Coding\GraphQL\my-app\server\node_modules\graphql\jsutils\instanceOf.js:15:13)
    at isSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\schema.js:52:35)
    at validateSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:55:25)
    at assertValidSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:80:16)
    at Object.validate (D:\Coding\GraphQL\my-app\server\node_modules\graphql\validation\validate.js:57:35)
    at doRunQuery (D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:110:38)
    at D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:21:56
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
Error: Cannot use GraphQLSchema "[object GraphQLSchema]" 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.
    at instanceOf (D:\Coding\GraphQL\my-app\server\node_modules\graphql\jsutils\instanceOf.js:15:13)
    at isSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\schema.js:52:35)
    at validateSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:55:25)
    at assertValidSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:80:16)
    at Object.validate (D:\Coding\GraphQL\my-app\server\node_modules\graphql\validation\validate.js:57:35)
    at doRunQuery (D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:110:38)
    at D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:21:56
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
Error: Cannot use GraphQLSchema "[object GraphQLSchema]" 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.
    at instanceOf (D:\Coding\GraphQL\my-app\server\node_modules\graphql\jsutils\instanceOf.js:15:13)
    at isSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\schema.js:52:35)
    at validateSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:55:25)
    at assertValidSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:80:16)
    at Object.validate (D:\Coding\GraphQL\my-app\server\node_modules\graphql\validation\validate.js:57:35)
    at doRunQuery (D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:110:38)
    at D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:21:56
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
Error: Cannot use GraphQLSchema "[object GraphQLSchema]" 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.
    at instanceOf (D:\Coding\GraphQL\my-app\server\node_modules\graphql\jsutils\instanceOf.js:15:13)
    at isSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\schema.js:52:35)
    at validateSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:55:25)
    at assertValidSchema (D:\Coding\GraphQL\my-app\server\node_modules\graphql\type\validate.js:80:16)
    at Object.validate (D:\Coding\GraphQL\my-app\server\node_modules\graphql\validation\validate.js:57:35)
    at doRunQuery (D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:110:38)
    at D:\Coding\GraphQL\my-app\server\node_modules\apollo-server-core\dist\runQuery.js:21:56
    at process.internalTickCallback (internal/process/next_tick.js:77:7)

Which seeing as the playground is served on 3000 now means that running the rest of the commands won't work yarn start inside my-app due to my-app default port being 3000.

However, if I just do yarn start / npm start inside my-app I do get localhost:3000 up and running with a blank Feed.

Any advice would be greatly appreciated.

JamesSingleton avatar Nov 14 '18 03:11 JamesSingleton

hi @JamesSingleton I'm having the same issue here, any update?

carlosjunod avatar Nov 29 '18 04:11 carlosjunod

@carlosjunod nope... I think it is due to updated versions somewhere, not entirely sure... It is a real big issue among the GraphQL/Apollo community where new versions of dependencies break or old dependencies no longer work for whatever reason and tutorials/boilerplates don't get updated.

JamesSingleton avatar Nov 29 '18 23:11 JamesSingleton