Known Issues and Troubleshooting
Review known issues and solutions.
This documentation is considered deprecated. If you use Front-End Sites today, we encourage you to migrate.
This section provides information on known issues and solutions to common troubleshooting scenarios.
Known Issues
Troubleshooting
Build works locally but won't build on Pantheon
Follow the steps below if your build works locally but won't build on Pantheon.
-
Make sure any environment variables you have locally are set in the site’s Dashboard.
-
Verify that your scripts in
package.jsonhave an explicit step for build and start. For example:- If the build and start steps have a different name, specify it in the Dashboard in the Advanced Settings section when creating a site. You can also specify this in the Builds section of the site’s dashboard.
Images are not showing up on my Next.js site
Consult the Next.js docs on their image component. Set the IMAGE_DOMAIN environment variable if the images are coming from a domain that is different from your liked CMS.
Make sure you are passing the IMAGE_DOMAIN as a prefix to the src prop if you are using the next/image component. Refer to Next.js documentation for more information.
The Decoupled Drupal health check is failing with BackendNotSetError
In order for your site to build successfully, your decoupled Front-End must point to a valid CMS endpoint. This is done through the use of the BACKEND_URL or PANTHEON_CMS_ENDPOINT environment variables. Only one of these environment variables is required to be set.
If used, the BACKEND_URL variable should be set to the URL of your CMS site. If you choose to use the PANTHEON_CMS_ENDPOINTvariable, it should be set to the URL of your CMS site without protocol. For example:
In order to set an enviornment variable through the Pantheon Dashboard, navigate to your sites Overview > Settings > Builds page and scroll down to Site Environment Variables. Add the key of your environment variable and it's corresponding value.
To mock a backend for local development, define it in your projects .env.development.local file: For example: