Known Issues and Troubleshooting
Review known issues and solutions.
This section provides information on known issues and solutions to common troubleshooting scenarios.
Known Issues
A repository can only be associated with one Front-End Site
Gatsby does not support SSR and DSG
Manual support is required
Preview functionality is not supported for Gatsby
Renaming a linked repository in GitHub will cause a break in your decoupled experience.
Select files can cause build errors
Select files, such as .dockerignore
and .gcloudignore
files can cause build errors or failed builds. Removing these files from source and adding them to .gitignore
solves the issue.
Users must have permissions to enable decoupled for GitHub organization accounts.
How to uninstall a VCS
Uninstalling a GitHub application successfully requires manual intervention by the Pantheon Support team. Reach out to Support if you need to uninstall your GitHub application to connect and reinstall to a different GitHub account. If you have attempted to uninstall on your own and are unable to proceed, reach out to Support to correct your account.
Next.js 13 App Router
The caching recommendations outlined for use with our Next.js starter kits are currently only compatible with the Next.js Pages Router, not the App Router.
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.json
have an explicit step for build and start. For example:"scripts":{ "build": "next build", "start": "next start" }
- 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_ENDPOINT
variable, it should be set to the URL of your CMS site without protocol. For example:
BACKEND_URL -> "https://dev-my-drupal-site.pantheonsite.io"
PANTHEON_CMS_ENDPOINT -> "dev-my-drupal-site.pantheonsite.io"
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:
BACKEND_URL="https://dev-my-drupal-site.pantheonsite.io"
// Or
PANTHEON_CMS_ENDPOINT="dev-my-drupal-site.pantheonsite.io"