ShahriarKh / strapi-content-type-explorer

🗺 Content-Type Explorer is a Strapi plugin that visualizes your content types and their relationships like an ERD (Entity Relationship Diagram).
MIT License
25 stars 4 forks source link

Strapi 5 support? #14

Open broksonic21 opened 1 month ago

broksonic21 commented 1 month ago

Any plans for Strapi 5 support? Big fans of your plugin, but it's blocked due to https://github.com/ShahriarKh/strapi-content-type-explorer/blob/main/package.json#L22 currently

ShahriarKh commented 1 month ago

Hey! I haven't tried Strapi 5 yet, but I will take a look soon & see what changes are required so the plugin can run. BTW, feel free to open a pull request.

matbrgz commented 1 month ago

Hello,

I'm encountering an error when trying to build the admin panel with Strapi 5 using your plugin. Here are the steps I followed and the error message I received:

$ yarn build
✔ Compiling TS (2235ms)
⠋ Building build context
[INFO] Including the following ENV variables as part of the JS bundle:
    - ADMIN_PATH
    - STRAPI_ADMIN_BACKEND_URL
    - STRAPI_TELEMETRY_DISABLED
✔ Building build context (134ms)
⠋ Building admin panel
✖ Building admin panel
[ERROR]  There seems to be an unexpected error, try again with --debug for more information 

┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                                      │
│   [vite]: Rollup failed to resolve import "@strapi/helper-plugin" from                                               │
│   "/home/cooper/dev/crm-backend/node_modules/strapi-content-type-explorer/admin/src/index.js".                       │
│   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`                                                                                     │
│   at viteWarn (file:///home/cooper/dev/crm-backend/node_modules/@strapi/strapi/node_modules/vite/dist/node/chunks/   │
│   dep-p3C6MpSJ.js:68875:27)                                                                                          │
│   at onwarn                                                                                                          │
│   (/home/cooper/dev/crm-backend/node_modules/@strapi/strapi/node_modules/@vitejs/plugin-react-swc/index.cjs:198:9)   │
│   at onRollupWarning (file:///home/cooper/dev/crm-backend/node_modules/@strapi/strapi/node_modules/vite/dist/node/   │
│   chunks/dep-p3C6MpSJ.js:68900:9)                                                                                    │
│   at onwarn (file:///home/cooper/dev/crm-backend/node_modules/@strapi/strapi/node_modules/vite/dist/node/chunks/de   │
│   p-p3C6MpSJ.js:68586:13)                                                                                            │
│   at file:///home/cooper/dev/crm-backend/node_modules/rollup/dist/es/shared/node-entry.js:19393:13                   │
│   at Object.logger [as onLog]                                                                                        │
│   (file:///home/cooper/dev/crm-backend/node_modules/rollup/dist/es/shared/node-entry.js:21119:9)                     │
│   at ModuleLoader.handleInvalidResolvedId                                                                            │
│   (file:///home/cooper/dev/crm-backend/node_modules/rollup/dist/es/shared/node-entry.js:20008:26)                    │
│   at file:///home/cooper/dev/crm-backend/node_modules/rollup/dist/es/shared/node-entry.js:19966:26                   │
│   at async Promise.all (index 1)                                                                                     │
│                                                                                                                      │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

It seems that Rollup failed to resolve the import @strapi/helper-plugin from strapi-content-type-explorer/admin/src/index.js. Is this a known issue with Strapi 5 compatibility? Do you have any suggestions on how to resolve this error?

Thank you for your help!