pluginpal / strapi-plugin-sitemap

🔌 Generate a highly customizable sitemap XML in Strapi CMS
https://www.pluginpal.io/plugin/sitemap
MIT License
252 stars 53 forks source link

error in the build of the app #190

Open HashemSalameh opened 5 hours ago

HashemSalameh commented 5 hours ago

i have migrated to the latest version of strapi, and i want to add the sitemap addon but the issue is in the react-router-dom dependency where strapi require version 6 of it and the strapi webtools->sitemap use react-router-dom v5

i'll provide you with my dependencies of the package.json using node version 20.

the scenario is from my terminal im using @latest because i have this issue since yesterday so i was trying to seek the latest:

yarn add @pluginpal/webtools-core@latest then, yarn add @pluginpal/webtools-addon-sitemap@latest then, yarn build

i got this error: [vite]: Rollup failed to resolve import "@strapi/design-system/v2" from "C:/Users/user/repos/Talmaro/TalmaroCMS/node_modules/@strapi/helper-plugin/dist/index.mjs".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external

i tried then to upgrade the helper-plugin:

yarn add @strapi/helper-plugin@latest

then i built the app and got the following error, node_modules/@pluginpal/webtools-addon-sitemap/node_modules/@strapi/helper-plugin/dist/index.mjs (6:9): "Redirect" is not exported by
"node_modules/react-router-dom/dist/index.js", imported by "node_modules/@pluginpal/webtools-addon-sitemap/node_modules/@strapi/helper-plugin/dist/index.mjs".
file: C:/Users/user/repos/Talmaro/TalmaroCMS/node_modules/@pluginpal/webtools-addon-sitemap/node_modules/@strapi/helper-plugin/dist/index.mjs:6:9

the following are the dependencies of my package.json: "dependencies": { "@pluginpal/webtools-addon-sitemap": "^1.0.0-beta.10", "@pluginpal/webtools-core": "^1.0.0-beta.15", "@strapi/plugin-users-permissions": "5.4.1", "@strapi/provider-upload-aws-s3": "^5.4.1", "@strapi/strapi": "5.4.1", "@strapi/utils": "^4.8.2", "pg": "8.8.0", "react": "^18.0.0", "react-dom": "^18.0.0", "react-router-dom": "^6.0.0", "strapi-plugin-populate-deep": "^3.0.0", "strapi-v5-plugin-populate-deep": "^4.0.4", "styled-components": "^6.0.0" }, "engines": { "node": ">=18.x.x", "npm": ">=6.0.0" },

boazpoolman commented 3 hours ago

Hi @HashemSalameh,

The sitemap plugin does not yet support Strapi 5. See #186.