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?
You don’t need to set that as an enviroment variable. It gets auto-populated for you when using @netlify/blobs in Netlify Functions and Edge Functions.
Hello, To follow up on my last message, the issue is still persisting. I have found another user on your forums who experienced the exact same problem: a `MissingBlobsEnvironmentError` even when everything is configured correctly. Here is the link to their topic: https://answers.netlify.com/t/urgent-netlify-site-id-is-not-defined-in-function-runtime-netlify-blobs-fails/133600 This confirms that my issue is a platform-level provisioning bug where the necessary environment variables (like `NETLIFY_SITE_ID`) are not being injected into my function’s runtime. Like the other user, I have already tried all the standard solutions (re-deploying, clearing cache, re-creating the site, checking all configurations). The error remains the same. My site ID is: **41bc8e53-ebb3-4731-91c9-e904f17b15ec** (pour le site chance-croissant-d34b5e) Please escalate this issue internally and manually check the environment provisioning for my site. I am completely blocked by this platform bug. Thank you.