Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate "graphql" modules cannot be used at the same time since different #6073

Closed
WahdanZ opened this issue Sep 22, 2019 · 5 comments
Closed
Labels
type:question Support or code-level question

Comments

@WahdanZ
Copy link

WahdanZ commented Sep 22, 2019

I try to run graphql with parse server I get this error
"parse": "2.7.1",
"parse-server": "3.9.0",

Ensure that there is only one instance of "graphql" in the node_modules server_1 | directory. If different versions of "graphql" are the dependencies of other server_1 | relied on modules, use "resolutions" to ensure only one version is installed. server_1 | server_1 | https://yarnpkg.com/en/docs/selective-version-resolutions server_1 | server_1 | Duplicate "graphql" modules cannot be used at the same time since different server_1 | versions may have different capabilities and behavior. The data from one server_1 | version used in the function from another could produce confusing and server_1 | spurious results. server_1 | at instanceOf (/app/node_modules/parse-server/node_modules/graphql/jsutils/instanceOf.js:28:13) server_1 | at isScalarType (/app/node_modules/parse-server/node_modules/graphql/type/definition.js:103:34) server_1 | at isType (/app/node_modules/parse-server/node_modules/graphql/type/definition.js:86:10) server_1 | at isNullableType (/app/node_modules/parse-server/node_modules/graphql/type/definition.js:380:10) server_1 | at assertNullableType (/app/node_modules/parse-server/node_modules/graphql/type/definition.js:384:8) server_1 | at new GraphQLNonNull (/app/node_modules/parse-server/node_modules/graphql/type/definition.js:345:19) server_1 | at Object.load (/app/node_modules/parse-server/lib/GraphQL/loaders/filesMutations.js:30:15) server_1 | at Object.load (/app/node_modules/parse-server/lib/GraphQL/loaders/defaultGraphQLMutations.js:21:18) server_1 | at ParseGraphQLSchema.load (/app/node_modules/parse-server/lib/GraphQL/ParseGraphQLSchema.js:103:29) server_1 | at <anonymous> server_1 | at process._tickDomainCallback (internal/process/next_tick.js:229:7) server_1 | error: Error: Cannot use GraphQLScalarType "Upload" from another module or realm. server_1 | server_1 | Ensure that there is only one instance of "graphql" in the node_modules server_1 | directory. If different versions of "graphql" are the dependencies of other server_1 | relied on modules, use "resolutions" to ensure only one version is installed. server_1 | server_1 | https://yarnpkg.com/en/docs/selective-version-resolutions

@davimacedo
Copy link
Member

Can you please take a look in this thread? You seem to have a similar problem. Can you please also share your current package.json?

@WahdanZ
Copy link
Author

WahdanZ commented Sep 27, 2019

{
   "name":"bind-server",
   "version":"0.0.1",
   "description":"My Server Base On Parse Platform",
   "private":true,
   "main":"index.js",
   "scripts":{
      "ng":"ng",
      "pm2":"pm2",
      "watch":"ng serve",
      "build":"ng build --prod",
      "test":"ng test",
      "lint":"ng lint",
      "e2e":"ng e2e",
      "backup":"node script/backup.js",
      "restore":"node script/restore.js",
      "setup":"node script/setup.js",
      "start":"nodemon --watch server/cloud index.js",
      "nodemon":"nodemon --watch server/cloud index.js",
      "docker":"docker-compose exec server npm run"
   },
   "repository":{
      "type":"git",
      "url":"https://github.com/ParsePlatform/parse-server-example"
   },
   "license":"MIT",
   "dependencies":{
      "docker-links":"^1.0.2",
      "express":"4.17.1",
      "mongodb":"3.3.2",
      "nodemon":"^1.19.2",
      "dotenv":"^8.1.0",
      "parse-server-generic-email-adapter":"0.0.4",
      "parse":"2.7.1",
      "parse-server":"3.9.0",
      "parse-dashboard":"2.0.3",
      "parse-server-swagger":"0.1.0",
      "parse-cloud-function":"1.0.1",
      "parse-cloud-classes":"^1.0.1",
      "parse-server-addon-cloud-class":"^1.1.1",
      "joi":"14.3.1",
      "sendmail":"1.6.1",
      "pm2":"^3.5.1",
      "args":"^5.0.1",
      "mongodb-backup":"^1.6.9",
      "mongodb-restore":"^1.6.2",
      "axios":"^0.19.0",
      "google-libphonenumber":"^3.2.4",
      "i18n-iso-countries":"^4.3.1",
      "qs":"^6.8.0",
      "redis":"^2.8.0"
   },
   "engines":{
      "node":">=8.0.0"
   }
}

@WahdanZ
Copy link
Author

WahdanZ commented Sep 27, 2019

I add these lines but I get the same error,
"resolutions": {
"graphql": "^14.5.4",
"**/graphql": "^14.5.4"
}

@davimacedo
Copy link
Member

Can you try to remove parse-dashboard from the dependencies and try again? Also, what versions of node and npm you are running?

@stale
Copy link

stale bot commented Nov 11, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Support or code-level question
Projects
None yet
Development

No branches or pull requests

3 participants