hey, actually I think it is a typo in

hey, actually I think it is a typo in documentation. Wrangler does not accept env.staging.vars and throws an error: The supported named-environments for Pages are "preview" and "production".
4 Replies
busterroni
busterroni4mo ago
where is the typo?
TheAifam5
TheAifam5OP4mo ago
Please take a look again on the message I wrote: https://discord.com/channels/595317990191398933/789155108529111069/1265819427555905606 Especially the part:
The configuration shows 2 environments:
[env.staging.vars] and [env.production.vars]
There is no such environment in Cloudflare Pages like "staging", but it is called "preview".
The configuration shows 2 environments:
[env.staging.vars] and [env.production.vars]
There is no such environment in Cloudflare Pages like "staging", but it is called "preview".
I have put the [env.staging.vars] in my wrangler.toml file and it results in an error The supported named-environments for Pages are "preview" and "production". In the response of a message linked above, I've got an answer from you that:
think the way it works is that everything other than the production domain is a preview domain. staging is an example
think the way it works is that everything other than the production domain is a preview domain. staging is an example
which looks like, based on the error message, is not the case.
TheAifam5
TheAifam5OP4mo ago
I know that this documentation: https://developers.cloudflare.com/workers/configuration/environment-variables/ refers to a Workers, is there a documentation for Pages or they are just "similar"?
Cloudflare Docs
Environment variables · Cloudflare Workers docs
Attach text strings and JSON values as environment variables to your Worker.
TheAifam5
TheAifam5OP4mo ago
I think a note in documentation would have sense that only supported environments for Cloudflare Pages in wrangler.toml are "production" and "preview" and the ".dev.vars" file.
Want results from more Discord servers?
Add your server