The environment variables below allow you to configure features of Gatsby Cloud:
NODE_VERSION: Specify the version of Node.js your project should use. For example,
NODE_VERSION=10. Defaults to
NPM_TOKEN: Use to access private npm modules.
NPM_REGISTRY: Use to set the URL of a private registry.
YARN_FLAGS: Flags that are passed through to the
NODE_OPTIONS: Passed through as options for Node.js. For example,
PREFIX_PATHS: Set to
trueto enable the
gatsby build. See the docs on prefix-paths.
These variables are pre-defined for both Builds and Preview environments. They are set automatically and cannot be changed. You can reference them in your
gatsby-config.js or anywhere else you would normally reference an environment variable.
BRANCH: The name of the current git branch. Useful for swapping environment variables depending on the branch.
true. Useful for checking if your build is running on Gatsby Cloud.
trueonly in the CMS Preview environment, for both legacy preview builder and incremental preview builder.