Cannot install Plugins "@strapi/plugin-graphql"
Bug report
Required System information
- Node.js version: v16.15.0
- NPM version: 8.5.5
- Strapi version: "4.3.2"
- Database:
- Operating system:
Steps to reproduce the behavior
Cannot run project after install Graphql Plugin. Error return: [2022-08-10 12:58:07.468] debug: ⛔️ Server wasn't able to start properly. [2022-08-10 12:58:07.469] error: merge.extractExtensionsFromSchema is not a function
Screenshots
Same for me when migrating to strapi "4.3.2"
+1
Same error here.
It is because of the latest change in @graphql-tools/merge accroding to ardatan/graphql-tools#4625
extractExtensionsFromSchema moved from @graphql-tools/merge to @graphql-tools/schema.
+1
Add the resolution filed to lock @graphql-tools/merge package version to 8.3.0 can solve this problem temporarily.
"resolutions": {
"**/@graphql-tools/merge": "8.3.0"
},
Add the resolution filed to lock
@graphql-tools/mergepackage version to 8.3.0 can solve this problem temporarily."resolutions": { "**/@graphql-tools/merge": "8.3.0" },
It work !!! Thank you @MikuZZZ
Add the resolution filed to lock
@graphql-tools/mergepackage version to 8.3.0 can solve this problem temporarily."resolutions": { "**/@graphql-tools/merge": "8.3.0" },
Same here. Thank you so much for this temporary fix!
If you are using npm you can add the following to your package.json until its fixed:
...
"overrides": {
"@graphql-tools/merge": "8.3.0"
},
...
Add the resolution filed to lock
@graphql-tools/mergepackage version to 8.3.0 can solve this problem temporarily."resolutions": { "**/@graphql-tools/merge": "8.3.0" },
I followed the setup for deploying strapi using heroku with graphql plugin, running it locally works fine, but after deploying it to heroku, the issue still exist. adding "resolutions" code above works for yarn and adding "overrides" works for npm, basically heroku uses npm. hope this helps.
I'm still getting this on Strapi 4.2.3. I've tried applying both resolutions and overrides, and for completeness added @graphql-tools/schema to the overrides, but I still get the issue. Any suggestions?
"dependencies": {
"@mattie-bundle/strapi-plugin-search": "1.0.0-alpha.3",
"@mattie-bundle/strapi-provider-search-algolia": "1.0.0-alpha.3",
"@strapi/plugin-graphql": "4.2.3",
"@strapi/plugin-i18n": "4.2.3",
"@strapi/plugin-users-permissions": "4.2.3",
"@strapi/provider-upload-cloudinary": "4.2.3",
"@strapi/strapi": "4.2.3",
"bullmq": "^1.86.5",
"node-bigcommerce": "^4.1.0",
"pg": "^8.7.3",
"sqlite3": "^5.0.5",
"strapi-plugin-preview-button": "^0.3.4"
},
"devDependencies": {
"@types/node": "16",
"babel-eslint": "^10.1.0"
},
"resolutions": {
"**/@graphql-tools/merge": "8.3.0",
"**/@graphql-tools/schema": "8.3.0"
},
"overrides": {
"@graphql-tools/merge": "8.3.0",
"@graphql-tools/schema": "8.3.0"
}
Same error here. I've tried installing it on both v4.2.2 and v4.3.2.
I'm still getting this on Strapi 4.2.3. I've tried applying both
resolutionsandoverrides, and for completeness added@graphql-tools/schemato the overrides, but I still get the issue. Any suggestions?"dependencies": { "@mattie-bundle/strapi-plugin-search": "1.0.0-alpha.3", "@mattie-bundle/strapi-provider-search-algolia": "1.0.0-alpha.3", "@strapi/plugin-graphql": "4.2.3", "@strapi/plugin-i18n": "4.2.3", "@strapi/plugin-users-permissions": "4.2.3", "@strapi/provider-upload-cloudinary": "4.2.3", "@strapi/strapi": "4.2.3", "bullmq": "^1.86.5", "node-bigcommerce": "^4.1.0", "pg": "^8.7.3", "sqlite3": "^5.0.5", "strapi-plugin-preview-button": "^0.3.4" }, "devDependencies": { "@types/node": "16", "babel-eslint": "^10.1.0" }, "resolutions": { "**/@graphql-tools/merge": "8.3.0", "**/@graphql-tools/schema": "8.3.0" }, "overrides": { "@graphql-tools/merge": "8.3.0", "@graphql-tools/schema": "8.3.0" }
Which version of node are you using ? With v14 i had the same problem but not with v16
+1
I've resolved this, for anyone searching: if you are using yarn workspaces with hoisting your resolutions declaration needs to be in your root package.json.
Marking as confirmed due to volume of confirmations.
Just as an update to this issue, we are currently deploying an experimental release to check the fix above works and once we confirm that we will release a hotfix.
Could I have a few of you do us a favor and test using the experimental tag:
npx create-strapi-app@experimental testHotfix --quickstart --no-run (don't forget to install the graphql plugin)
Or you can move your package versions to: 0.0.0-8581854cb3
{
"name": "test-hotfix",
"private": true,
"version": "0.1.0",
"description": "A Strapi application",
"scripts": {
"develop": "strapi develop",
"start": "strapi start",
"build": "strapi build",
"strapi": "strapi"
},
"devDependencies": {},
"dependencies": {
"@strapi/plugin-graphql": "^0.0.0-8581854cb3",
"@strapi/plugin-i18n": "0.0.0-8581854cb3",
"@strapi/plugin-users-permissions": "0.0.0-8581854cb3",
"@strapi/strapi": "0.0.0-8581854cb3",
"better-sqlite3": "7.4.6"
},
"author": {
"name": "A Strapi developer"
},
"strapi": {
"uuid": "e6de134e-c98c-4ac8-a9fd-3ec53af2bfed"
},
"engines": {
"node": ">=12.x.x <=16.x.x",
"npm": ">=6.0.0"
},
"license": "MIT"
}
Works for me!
Works for me!
Can you confirm your node-version as we noticed that some users on node 16 still get the same error
Works for me!
Can you confirm your node-version as we noticed that some users on node 16 still get the same error
Tried on v14 and v16. Works on both for me
looks good to me as well 👍

Edit:
Though on another env (docker) I had to use --force to install due to this:
#0 22.47 npm ERR! code ERESOLVE
#0 22.48 npm ERR! ERESOLVE could not resolve
#0 22.48 npm ERR!
#0 22.48 npm ERR! While resolving: @strapi/[email protected]
#0 22.49 npm ERR! Found: @strapi/[email protected]
#0 22.49 npm ERR! node_modules/@strapi/strapi
#0 22.49 npm ERR! @strapi/strapi@"0.0.0-8581854cb3" from the root project
#0 22.49 npm ERR!
#0 22.49 npm ERR! Could not resolve dependency:
#0 22.49 npm ERR! peer @strapi/strapi@"^4.0.0" from @strapi/[email protected]
#0 22.49 npm ERR! node_modules/@strapi/plugin-graphql
#0 22.49 npm ERR! @strapi/plugin-graphql@"0.0.0-8581854cb3" from the root project
#0 22.49 npm ERR!
#0 22.49 npm ERR! Conflicting peer dependency: @strapi/[email protected]
#0 22.49 npm ERR! node_modules/@strapi/strapi
#0 22.49 npm ERR! peer @strapi/strapi@"^4.0.0" from @strapi/[email protected]
#0 22.49 npm ERR! node_modules/@strapi/plugin-graphql
#0 22.49 npm ERR! @strapi/plugin-graphql@"0.0.0-8581854cb3" from the root project
#0 22.49 npm ERR!
#0 22.49 npm ERR! Fix the upstream dependency conflict, or retry
#0 22.49 npm ERR! this command with --force, or --legacy-peer-deps
#0 22.49 npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
#0 22.49 npm ERR!
#0 22.49 npm ERR! See /root/.npm/eresolve-report.txt for a full report.
#0 22.50
#0 22.50 npm ERR! A complete log of this run can be found in:
#0 22.50 npm ERR! /root/.npm/_logs/2022-08-10T16_27_22_833Z-debug-0.log
It looks like we have determined this isn't an issue that was caused by a change we made but we think there is some other work arounds.
This problem has been fixed on @graphql-tools repo. Thank you to ardatan for the quick fix :)
To fix, just make sure you delete your package-lock.json and/or yarn.lock and reinstall node_modules, no Strapi version upgrade needed.
TY everyone for reporting this!