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

Support on Strapi v5 #38

Closed
bwcr opened this issue Sep 25, 2024 · 0 comments · Fixed by #39
Closed

Support on Strapi v5 #38

bwcr opened this issue Sep 25, 2024 · 0 comments · Fixed by #39

Comments

@bwcr
Copy link

bwcr commented Sep 25, 2024

Updating to Strapi v5 while having this plugin installed resulting this error:

✘ [ERROR] Could not resolve "@strapi/design-system/Stack"

    node_modules/strapi-plugin-wysiwyg-react-md-editor/admin/src/components/ReactMdEditor/index.tsx:7:22:
      7 │ import { Stack } from "@strapi/design-system/Stack";
        ╵                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  Importing the directory "./dist/Stack" is forbidden by this package:

    node_modules/strapi-plugin-wysiwyg-react-md-editor/node_modules/@strapi/design-system/package.json:23:11:
      23 │     "./*": "./dist/*"
         ╵            ~~~~~~~~~~

  The presence of "exports" here makes importing a directory forbidden:

    node_modules/strapi-plugin-wysiwyg-react-md-editor/node_modules/@strapi/design-system/package.json:9:2:
      9 │   "exports": {
        ╵   ~~~~~~~~~

  Import from "@strapi/design-system/Stack/index.js" to get the file
  "node_modules/strapi-plugin-wysiwyg-react-md-editor/node_modules/@strapi/design-system/dist/Stack/index.js":

    node_modules/strapi-plugin-wysiwyg-react-md-editor/admin/src/components/ReactMdEditor/index.tsx:7:50:
      7 │ import { Stack } from "@strapi/design-system/Stack";
        │                                                   ^
        ╵                                                   /index.js

  You can mark the path "@strapi/design-system/Stack" as external to exclude it from the bundle,
  which will remove this error and leave the unresolved path in the bundle.

✘ [ERROR] Could not resolve "@strapi/design-system/Box"

    node_modules/strapi-plugin-wysiwyg-react-md-editor/admin/src/components/ReactMdEditor/index.tsx:8:20:
      8 │ import { Box } from "@strapi/design-system/Box";
        ╵                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~

  Importing the directory "./dist/Box" is forbidden by this package:

    node_modules/strapi-plugin-wysiwyg-react-md-editor/node_modules/@strapi/design-system/package.json:23:11:
      23 │     "./*": "./dist/*"
         ╵            ~~~~~~~~~~

  The presence of "exports" here makes importing a directory forbidden:

    node_modules/strapi-plugin-wysiwyg-react-md-editor/node_modules/@strapi/design-system/package.json:9:2:
      9 │   "exports": {
        ╵   ~~~~~~~~~

  Import from "@strapi/design-system/Box/index.js" to get the file
  "node_modules/strapi-plugin-wysiwyg-react-md-editor/node_modules/@strapi/design-system/dist/Box/index.js":

    node_modules/strapi-plugin-wysiwyg-react-md-editor/admin/src/components/ReactMdEditor/index.tsx:8:46:
      8 │ import { Box } from "@strapi/design-system/Box";
        │                                               ^
        ╵                                               /index.js

  You can mark the path "@strapi/design-system/Box" as external to exclude it from the bundle, which
  will remove this error and leave the unresolved path in the bundle.

✘ [ERROR] Could not resolve "@strapi/design-system/Typography"

    node_modules/strapi-plugin-wysiwyg-react-md-editor/admin/src/components/ReactMdEditor/index.tsx:9:27:
      9 │ import { Typography } from "@strapi/design-system/Typography";
        ╵                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  Importing the directory "./dist/Typography" is forbidden by this package:

    node_modules/strapi-plugin-wysiwyg-react-md-editor/node_modules/@strapi/design-system/package.json:23:11:
      23 │     "./*": "./dist/*"
         ╵            ~~~~~~~~~~

  The presence of "exports" here makes importing a directory forbidden:

    node_modules/strapi-plugin-wysiwyg-react-md-editor/node_modules/@strapi/design-system/package.json:9:2:
      9 │   "exports": {
        ╵   ~~~~~~~~~

  Import from "@strapi/design-system/Typography/index.js" to get the file
  "node_modules/strapi-plugin-wysiwyg-react-md-editor/node_modules/@strapi/design-system/dist/Typography/index.js":

    node_modules/strapi-plugin-wysiwyg-react-md-editor/admin/src/components/ReactMdEditor/index.tsx:9:60:
      9 │ import { Typography } from "@strapi/design-system/Typography";
        │                                                             ^
        ╵                                                             /index.js

  You can mark the path "@strapi/design-system/Typography" as external to exclude it from the
  bundle, which will remove this error and leave the unresolved path in the bundle.

5:27:14 AM [vite] error while updating dependencies:
Error: Build failed with 3 errors:
node_modules/strapi-plugin-wysiwyg-react-md-editor/admin/src/components/ReactMdEditor/index.tsx:7:22: ERROR: Could not resolve "@strapi/design-system/Stack"
node_modules/strapi-plugin-wysiwyg-react-md-editor/admin/src/components/ReactMdEditor/index.tsx:8:20: ERROR: Could not resolve "@strapi/design-system/Box"
node_modules/strapi-plugin-wysiwyg-react-md-editor/admin/src/components/ReactMdEditor/index.tsx:9:27: ERROR: Could not resolve "@strapi/design-system/Typography"
    at failureErrorWithLog (/home/ubuntu/personal/portfolio-lawfirm-strapi/node_modules/vite/node_modules/esbuild/lib/main.js:1651:15)
    at /home/ubuntu/personal/portfolio-lawfirm-strapi/node_modules/vite/node_modules/esbuild/lib/main.js:1059:25
    at /home/ubuntu/personal/portfolio-lawfirm-strapi/node_modules/vite/node_modules/esbuild/lib/main.js:1527:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Strapi Version:
v5.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant