Invoking the worker throws a Cloudflare error. Examining the log stream in the Cloudflare dashboard shows the following exception:
"exceptions": [
{
"stack": " at Object.get (worker.mjs:57:11)\n at fetch (worker.mjs:64:44)\n at Object.fetch (worker.mjs:41:14)",
"name": "Error",
"message": "\"App\" is not linked",
"timestamp": 1715985053747
}
],
Upon further investigation, going to the worker in the Cloudflare dashboard then to the Variables tab shows:
Then, a quick look in sdk/js/src/resource.ts#L27 shows it populates the key from the Cloudflare env as-is without stripping the SST_RESOURCE_ prefix like it does when reading from process.env on line 16.
Resource.App
does not currently work on Cloudflare Workers. Using0.0.364
with the following worker script and config:Invoking the worker throws a Cloudflare error. Examining the log stream in the Cloudflare dashboard shows the following exception:
Upon further investigation, going to the worker in the Cloudflare dashboard then to the Variables tab shows:
Then, a quick look in
sdk/js/src/resource.ts#L27
shows it populates the key from the Cloudflare env as-is without stripping theSST_RESOURCE_
prefix like it does when reading fromprocess.env
on line 16.