Reputation: 23
I'm attempting to build a SvelteKit that deploys with Cloudflare using this adaptor https://kit.svelte.dev/docs/adapter-cloudflare
However when I run "CF_PAGES=1 vite build" I get the following error "'CF_PAGES' is not recognized as an internal or external command, operable program or batch file."
I suspect I may be missing an environment variable.
Upvotes: 1
Views: 236
Reputation: 83768
The cause is that you are attempting to run the UNIX command on Microsoft Windows.
Potential solutions
Translate UNIX command syntax of setting environment variables to Microsoft Windows command syntax. See here how to set environment variables on Windows
Use a UNIX based workflow on Microsoft Windows, like WSL2 or Docker containers
Upvotes: 1