yasudacloud / strapi-plugin-sso

MIT License
88 stars 61 forks source link

Errors after installing #60

Closed MagedWilliamdevlink closed 1 month ago

MagedWilliamdevlink commented 1 month ago

OS: Windows 11 build: 26120 NodeJS: v20.14.0 npm: v10.8.1 yarn: v1.22.22 Keycloak: v25.0.6 Strapi: v5.0.0

Here's a repo with my project setup: https://github.com/MagedWilliamdevlink/strapi-v5-keycloak-poc

I've installed the above to try the plugin with keycloak, after installing the plugin via yarn yarn add strapi-plugin-sso, i get the following errors when trying to access http://localhost:1337/:



    node_modules/strapi-plugin-sso/admin/src/index.js:1:39:
      1 │ import {prefixPluginTranslations} from '@strapi/helper-plugin';
        ╵                                        ~~~~~~~~~~~~~~~~~~~~~~~

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

✘ [ERROR] The JSX syntax extension is not currently enabled

    node_modules/strapi-plugin-sso/admin/src/components/PluginIcon/index.js:10:25:
      10 │ const PluginIcon = () => <Lock />;
         ╵                          ^

  The esbuild loader for this file is currently set to "js" but it must be set to "jsx" to be able
  to parse JSX syntax. You can use "loader: { '.js': 'jsx' }" to do that.

✘ [ERROR] The JSX syntax extension is not currently enabled

    node_modules/strapi-plugin-sso/admin/src/pages/App/index.js:15:4:
      15 │     <div>
         ╵     ^

  The esbuild loader for this file is currently set to "js" but it must be set to "jsx" to be able
  to parse JSX syntax. You can use "loader: { '.js': 'jsx' }" to do that.

✘ [ERROR] The JSX syntax extension is not currently enabled

    node_modules/strapi-plugin-sso/admin/src/pages/HomePage/index.js:99:4:
      99 │     <CheckPermissions permissions={[{action: 'plugin::strapi-plugin-sso.read', subject: null}]}>
         ╵     ^

  The esbuild loader for this file is currently set to "js" but it must be set to "jsx" to be able
  to parse JSX syntax. You can use "loader: { '.js': 'jsx' }" to do that.

✘ [ERROR] Could not resolve "@strapi/helper-plugin"

    node_modules/strapi-plugin-sso/admin/src/pages/HomePage/index.js:16:31:
      16 │ import {CheckPermissions} from '@strapi/helper-plugin';
         ╵                                ~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@strapi/helper-plugin" 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/helper-plugin"

    node_modules/strapi-plugin-sso/admin/src/utils/axiosInstance.js:6:21:
      6 │ import { auth } from '@strapi/helper-plugin';
        ╵                      ~~~~~~~~~~~~~~~~~~~~~~~

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

4:31:01 pm [vite] error while updating dependencies:
Error: Build failed with 6 errors:
node_modules/strapi-plugin-sso/admin/src/components/PluginIcon/index.js:10:25: ERROR: The JSX syntax extension is not currently enabled
node_modules/strapi-plugin-sso/admin/src/index.js:1:39: ERROR: Could not resolve "@strapi/helper-plugin"
node_modules/strapi-plugin-sso/admin/src/pages/App/index.js:15:4: ERROR: The JSX syntax extension is not currently enabled
node_modules/strapi-plugin-sso/admin/src/pages/HomePage/index.js:16:31: ERROR: Could not resolve "@strapi/helper-plugin"
node_modules/strapi-plugin-sso/admin/src/pages/HomePage/index.js:99:4: ERROR: The JSX syntax extension is not currently enabled
...
    at failureErrorWithLog (E:\strapi-v5\node_modules\vite\node_modules\esbuild\lib\main.js:1651:15)
    at E:\strapi-v5\node_modules\vite\node_modules\esbuild\lib\main.js:1059:25
    at E:\strapi-v5\node_modules\vite\node_modules\esbuild\lib\main.js:1527:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)```
yasudacloud commented 1 month ago

Hi! Thanks for the error report. Our plugin is not yet compatible with Version 5, so please wait until it is!

yasudacloud commented 1 month ago

@MagedWilliamdevlink Version 1.0.0, which supports Strapi v5, is now available. If you have any problems with this version, please feel free to contact us again!