-
Notifications
You must be signed in to change notification settings - Fork 1
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
Error: Id was already defined and imported as a type, check the docs for extending types #10
Comments
Checking. Can you drop here your |
{
"name": "project",
"private": true,
"version": "0.1.0",
"description": "A Strapi application",
"scripts": {
"dev": "strapi develop",
"start": "strapi start",
"build": "strapi build",
"strapi": "strapi"
},
"dependencies": {
"@_sh/strapi-plugin-ckeditor": "^2.0.4",
"@strapi/plugin-graphql": "^4.15.0",
"@strapi/plugin-i18n": "4.15.0",
"@strapi/plugin-seo": "^1.9.5",
"@strapi/plugin-users-permissions": "4.15.0",
"@strapi/strapi": "4.15.0",
"mysql": "2.18.1",
"strapi-plugin-comments": "^2.2.15",
"strapi-plugin-import-export-entries": "^1.21.1",
"strapi-plugin-multi-select": "^1.2.2",
"strapi-plugin-navigation": "^2.2.15",
"strapi-plugin-reactions": "^1.0.0"
},
"author": {
"name": "A Strapi developer"
},
"strapi": {
"uuid": ""
},
"engines": {
"node": ">=16.0.0 <=20.x.x",
"npm": ">=6.0.0"
},
"license": "MIT",
"volta": {
"node": "18.18.0"
}
} also my plugins.ts (without relations as it cause error from title) export default {
comments: {
enabled: true,
config: {
enabledCollections: ["api::article.article"],
badWords: true,
approvalFlow: ["api::article.article"],
entryLabel: {
"*": ["Title", "title", "Name", "name", "Subject", "subject"],
},
gql: {
auth: false,
},
},
},
navigation: { enabled: true },
seo: {
enabled: true,
},
"import-export-entries": {
enabled: true,
config: {
serverPublicHostname: "http://localhost:1337",
},
},
graphql: {
config: {
endpoint: "/graphql",
shadowCRUD: true,
playgroundAlways: false,
depthLimit: 14,
amountLimit: 100,
apolloServer: {
tracing: false,
},
},
},
}; with this added I got mentioned error reactions: {
enabled: true,
}, |
Also, with plugin installed I'm not able to enter single types edit pages |
Issue found but will need more work on as Single Types fails with reactions. ETA 3rd November EOD. |
@janlew fix released as part of |
@cyp3rius on version 1.1.1 still gets "Error: Id was already defined and imported as a type, check the docs for extending types" while this is in code (config/plugins.ts): reactions: {
enabled: true,
} I guess it's needed to make graphql mutations work as I still can't see it in playground. Here are my dependencies "dependencies": {
"@_sh/strapi-plugin-ckeditor": "^2.0.4",
"@strapi/plugin-graphql": "^4.15.0",
"@strapi/plugin-i18n": "4.15.0",
"@strapi/plugin-seo": "^1.9.6",
"@strapi/plugin-users-permissions": "4.15.0",
"@strapi/strapi": "^4.15.0",
"mysql": "2.18.1",
"strapi-plugin-comments": "^2.2.15",
"strapi-plugin-import-export-entries": "^1.21.1",
"strapi-plugin-multi-select": "^1.2.2",
"strapi-plugin-navigation": "^2.2.16",
"strapi-plugin-reactions": "^1.1.1"
}, |
Got an idea what might be wrong, both Plugins (navigation and reactions) define the Id type for GQL. Will fix it shortly |
Types fixed in |
@cyp3rius when plugin installed and trying to "npm run dev" I got error:
not sure if it's not Strapi error as I can see that from version 4.15.0 there are many issues with building app but got this error only when strapi-plugin-reactions is installed |
Trying to reproduce it. Have you tried on the 4.15.4? |
Yes, I have 4.15.4 installed "dependencies": {
"@_sh/strapi-plugin-ckeditor": "^2.0.4",
"@strapi/plugin-graphql": "^4.15.4",
"@strapi/plugin-i18n": "4.15.4",
"@strapi/plugin-seo": "^1.9.6",
"@strapi/plugin-users-permissions": "4.15.4",
"@strapi/strapi": "^4.15.4",
"mysql": "2.18.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^5.3.4",
"strapi-plugin-comments": "^2.2.15",
"strapi-plugin-import-export-entries": "^1.21.1",
"strapi-plugin-multi-select": "^1.2.2",
"strapi-plugin-navigation": "^2.2.16",
"strapi-plugin-reactions": "^1.1.2",
"styled-components": "^5.3.11"
}, |
I've dropped direct dependency to Version |
Seems working now at first sight. I'll test it later today and edit this comment with feedback. |
Looking forward! Reopen the ticket please if issue still persist. |
When I add
reactions: { enabled: true, },
to my code I got
Error: Id was already defined and imported as a type, check the docs for extending types
without it it seems like reactions are working, but I can't use graphql queries and mutation (reactionKinds, reactionsListAll, reactionSet). They are just not available.
I had similar problem with your comments plugin, but in that case adding "comments" to config/plugins.ts fixed issue.
In that case adding "reactions" to config/plugins.ts make things worse :<
The text was updated successfully, but these errors were encountered: