Could not find index.html Error

If you get the following error when you start the Medusa application, typically in production:

Terminal
Could not find index.html in the admin build directory. Make sure to run 'medusa build' before starting the server.

Why this Error Occurred#

This error occurs if you didn't follow the build process correctly. For example, you don't have an .env.production file or you ran the start command outside the .medusa/server directory.


How to Fix it#

To fix this error, make sure you follow the build process correctly as explained in the Build documentation.

You can also follow the General Deployment documentation if you're facing this error in your deployed application. This guide gives you the general steps to follow when deploying your Medusa application.

Was this page helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break