You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks to this comment over at the cloudflare/kv-asset-handler repo I was able to get this working by adding the following type declaration file to the root of my Nitro project:
I named mine manifest.d.ts like in the comment mentioned above, but ideally, I think this should be either produced by Nitro under the .nitro/types dir (at least until Cloudflare can fix this issue) or we should push Cloudflare to resolve this. There are a couple (cloudflare/workers-sdk#4969, cloudflare/workers-sdk#4968) open issues over there already.
After some trial and error I've realized that I didn't properly read the very clear output from Nitro's build command. It says 'wrangler dev .output/server/index.mjs --site .output/public --local', and while the --local part is no longer needed - --site .output/publicis. It is the directory that __STATIC_CONTENT_MANIFEST resolves to.
@YannicEl, if you're like me and don't want a whole lot of options passed to your wrangler dev command, just add the following to your wrangler.toml file and you'll be good:
main = './.output/server/index.mjs'
[site]
bucket = './.output/public'
Environment
node: 18.13.0
nitropack: 2.4.1
Reproduction
https://stackblitz.com/edit/github-y5zrh4?file=package.json
wrangler dev
doesn't yet work in stackblitz so you have to download the project and run:npm i
npm run build
npm run dev
Describe the bug
When building nitro with the preset
cloudflare-module
and then try to deploy it to cloudflare you get the following error message:Looking at the output
index.mjs
file you can see that it imports a file called__STATIC_CONTENT_MANIFEST
But there is not file called
__STATIC_CONTENT_MANIFEST
in the.output
folderI'm happy to try writing a PR if somebody could lead me into the right direction.
What is the static file content manifest and when is it generated?
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: