Troubleshooting Cloud Deployments
In this guide, you'll find solutions to common issues that may arise when deploying your Medusa applications on Cloud.
Files Not Found After Deployment#
Before deploying your Medusa application on Cloud, Medusa runs the build script defined in your package.json file, then copies only the output of the build process, which is the .medusa/server directory.
The .medusa/server directory holds the compiled JavaScript files of your project, the production build of the admin dashboard, and other necessary files to run your Medusa application in production.
If you have custom files needed at runtime, such as a src/data directory that holds JSON files, modify the build script in your package.json file to copy these files to the .medusa/server directory after the build process.
For example:
This script copies the src/data directory to the .medusa/server directory following the build process.
Learn more in the Deployments Guide.
npm run postbuild with the appropriate command for your package manager, such as yarn postbuild.Troubleshooting Other Cloud Deployment Issues#
To troubleshoot other Cloud deployment issues, you can:
- Check the build and runtime logs of your deployment.
- Refer to Medusa's troubleshooting guides.
- Contact support for help.