createCustomAdminHooks Error
If you've installed Medusa prior to v1.12.3 with the create-medusa-app
Copy to Clipboard command, then you try to update the @medusajs/medusa
Copy to Clipboard and @medusajs/admin
Copy to Clipboard to the latest beta
Copy to Clipboard versions, you might run into the following error when running your Medusa backend:
This is because a previous version of medusa-react
Copy to Clipboard allowed creating custom hooks using createCustomAdminHooks
Copy 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:
- If you haven't used
createCustomAdminHooks
Copy to Clipboard in your code, then you can delete the content of thesrc/admin
Copy to Clipboard directory which holds the widgets that create your onboarding flow, then try running your Medusa backend. - If you've used the
createCustomAdminHooks
Copy 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?