lautr / strapi-plugin-duplicate-button

19 stars 8 forks source link

Bug: Build failed @strapi/strapi 4.15.4 #20

Closed Drunkenpilot closed 12 months ago

Drunkenpilot commented 1 year ago

Error details

> strapi build

✔ Compiling TS (1873.3834049999714ms)
⠋ Building build context
⠙ 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 (258.95838099718094ms)
⠋ Building admin panel
⠸ Building admin panel[ERROR] Module not found: Error: Package path ./admin/src/content-manager/hooks/usePluginsQueryParams is not exported from package /app/node_modules/@strapi/admin (see exports field in /app/node_modules/@strapi/admin/package.json)
✖ Building admin panel
[ERROR]  There seems to be an unexpected error, try again with --debug for more information 
PenguinOfWar commented 1 year ago

I addressed this in my PR #19.

If this is urgent for you, you could patch the files with my changes using something like patch-package.

vishnupeas commented 1 year ago

same issue here

daniele-sarnari-blinkoo commented 12 months ago

Can we please merge and create a new release? @lautr @Dupflo Thanks

Dupflo commented 12 months ago

@daniele-sarnari-blinkoo sorry only @lautr can do it for us ! I am contributor since one of my PR's was merged but I cannot do it

aloxlamm commented 12 months ago

admin > src > components > DuplicateButton > index.js

import usePluginsQueryParams from "@strapi/admin/admin/src/content-manager/hooks/usePluginsQueryParams";

is broken in v4.15.4

temporary move the hook inline fixes it:

/**
 * fix broken import with v14.5.4
 */
// import usePluginsQueryParams from "@strapi/admin/admin/src/content-manager/hooks/usePluginsQueryParams";
import { parse, stringify } from 'qs';
import { useLocation } from 'react-router-dom';

const usePluginsQueryParams = () => {
  const { search } = useLocation();
  const query = search ? parse(search.substring(1)) : {};

  return query.plugins ? stringify({ plugins: query.plugins }, { encode: false }) : '';
};
/**
 * end fix broken import with v14.5.4
 */
lautr commented 12 months ago

Hi, i merged the update and published a new release