workers-sdk
workers-sdk copied to clipboard
🐛 BUG: `__STATIC_CONTENT_MANIFEST` is not defined
What version of Wrangler are you using?
2.0.23
What operating system are you using?
Linux
Describe the Bug
I'm attempting to use ES-module style with @cloudflare/kv-asset-handler. The README.md says to use __STATIC_CONTENT_MANIFEST. However this variable does not exist.
When attempting to deploy it says:
✘ [ERROR] A request to the Cloudflare API (/accounts/5e0333335a21846798fafca9e55e044f/workers/scripts/polykey-docs-dev) failed.
Uncaught ReferenceError: __STATIC_CONTENT_MANIFEST is not defined
at line 0
[code: 10021]
Also I was using TS, what is the right way to make TS believe that this string exists?
could you make a small standalone repo that reproduces this problem? we'd be happy to investigate
Closing this, as there's not enough detail to reproduce. This seems like the flavour of issue that comes up when the right section isn't set up in wrangler.toml:
[site]
bucket = "./your-asset-folder-path"
There's also a demo of how to use this on the @cloudflare/kv-asset-handler repo.