Hi, checking in to see what might be the cause of some new dev-breaking behavior we are seeing when running netlify dev – it seems like none of the environmental variables that are registered in the Netlify UI admin for our site (https://paverops.netlify.app/) are being pulled on dev.
The stage and prod versions both seem to run fine, but in dev the same env vars are returning undefined. Looking closely, I can see that where normally we would see env var loading confirmation, there is a deprecation message instead:
◈ Netlify Dev ◈
◈ Injected build settings env var: DEPRECATED
◈ Ignored general context env var: LANG (defined in process)
◈ Loaded function clear-visible-areas-background.
◈ Loaded function export-layer-background.
◈ Loaded function generate-views-background.
◈ Loaded function get-app-token.
◈ Loaded function get-s3-file.
◈ Loaded function get-s3-presigned.
◈ Loaded function post-process-data-background.
◈ Loaded function publish-data.
◈ Loaded function schedule-index-rebuild-background.
◈ Loaded function send-email.
◈ Loaded function update-visible-areas-background.
◈ Loaded function upload-data-background.
◈ Loaded function upload-drawing.
◈ Loaded function verify-user.
◈ Functions server is listening on 52953
◈ Starting Netlify Dev with Gatsby
Update: running netlify env:list shows this output:
netlify env:list
site: paverops
.-----------------------------------------------------------------------------------------------------------------------------------------------.
| Environment variables |
|-----------------------------------------------------------------------------------------------------------------------------------------------|
| Key | Value |
|------------|----------------------------------------------------------------------------------------------------------------------------------|
| GATSBY_ENV | prod |
| DEPRECATED | Please use the new environment variable endpoints outlined here: https://docs.netlify.com/api/get-started/#environment-variables |
'-----------------------------------------------------------------------------------------------------------------------------------------------'
And that link from the DEPRECATED line drops me at a page that describes how to use the Netlify API to request env vars. Surely this doesn’t mean I need to request each individual env var from the API does it? It would be easier just to keep a separate .env file, even though that seems like bad practice.
@ewags I’m having similar issues and upgraded Netlify CLI also…but still the environment variables aren’t happy…have you had any luck? If so, what did you do?