Skip to main content

createCustomAdminHooks Error

If you've installed Medusa prior to v1.12.3 with the create-medusa-appCopy to Clipboard command, then you try to update the @medusajs/medusaCopy to Clipboard and @medusajs/adminCopy to Clipboard to the latest betaCopy to Clipboard versions, you might run into the following error when running your Medusa backend:

Module '"medusa-react"' has no exported member 'createCustomAdminHooks'.
Report Incorrect CodeCopy to Clipboard

This is because a previous version of medusa-reactCopy to Clipboard allowed creating custom hooks using createCustomAdminHooksCopy to Clipboard. This has now changed to use different utility hooks, which you can learn about the Medusa React documentation.

To resolve this issue, you have the following options:

  1. If you haven't used createCustomAdminHooksCopy to Clipboard in your code, then you can delete the content of the src/adminCopy to Clipboard directory which holds the widgets that create your onboarding flow, then try running your Medusa backend.
  2. If you've used the createCustomAdminHooksCopy to Clipboard in your code, refer to the Medusa React to learn about the new utility hooks and how you can use them.
Was this page helpful?