You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 9, 2025. It is now read-only.
In addition to the variables you choose to declare, Netlify has a number of pre-defined variables built in. The following variables are automatically set for your builds, and their values are not changeable.
Describe the bug
Netlify
DEPLOY_URLandDEPLOY_PRIME_URLareundefinedin deploy preview.Not sure if this is the correct repository. If its not please let me know which one is?
Steps to reproduce
Watch the ___netlify-handler function logs and you will see it prints
undefinedfor both variables yet Netlify is supposed to auto-configure these env variables for you: https://docs.netlify.com/configure-builds/environment-variables/#deploy-urls-and-metadataCode
https://github.com/watadarkstar/repro-nextjs-netlify-deploy-url/blob/main/pages/api/hello.js
Configuration
Please enter the following command in a terminal and copy/paste its output:
System: OS: macOS 11.4 CPU: (8) x64 Apple M1 Memory: 142.12 MB / 16.00 GB Shell: 3.2.2 - /usr/local/bin/fish Binaries: Node: 16.11.0 - ~/.nvm/versions/node/v16.11.0/bin/node Yarn: 1.22.17 - ~/.nvm/versions/node/v16.11.0/bin/yarn npm: 8.0.0 - ~/.nvm/versions/node/v16.11.0/bin/npm Watchman: 2022.01.03.00 - /opt/homebrew/bin/watchman```