Hi Netlify Community & Support,
I’m blocked on my site clipcleanse-app (Site ID: 41bc8e53-ebb3-4731-91c9-e904f17b15ec) because essential Netlify environment variables like process.env.NETLIFY_SITE_ID are undefined when my functions run.
Problem:
My functions can’t access NETLIFY_SITE_ID. This causes @netlify/blobs to fail with MissingBlobsEnvironmentError because it needs that ID.
Evidence:
- A simple test function (netlify/functions/api/env-test.cjs) logs NETLIFY_SITE_ID: undefined.
- Other env vars like SITE_NAME and URL are present. CONTEXT and DEPLOY_URL are also undefined.
-
My pickup-code.cjs function, which uses getStore(), fails due to this.
-
My build process is correct: Build logs show my netlify.toml command runs, functions are copied to dist/functions/api/, and Netlify packages them from there. (Happy to share logs).
This seems like a Netlify platform issue where standard env vars aren’t being injected into my function’s runtime for this site.
I’ve cleared cache & redeployed, checked all configs.
How can I get NETLIFY_SITE_ID (and other standard vars) correctly populated in my functions so @netlify/blobs can work?
Thanks!