Error while deploying with Github Integration
I am deploying my workers via github integration and getting this error
[ERROR] In a non-interactive environment, it's necessary to set a CLOUDFLARE_API_TOKEN environment variable for wrangler to work. Please go to https://developers.cloudflare.com/fundamentals/api/get-started/create-token/ for instructions on how to create an api token, and assign its value to CLOUDFLARE_API_TOKEN.
The API token is specified in the Build settings for my workers so the CLOUDFLARE_API_TOKEN shouldn't be a problem.
I am using turborepo for my project and the deploy command is
and the root directory is
pnpm turbo deploy --filter=@repo/api
and the root directory is
apps/api
.Cloudflare Docs
Create API token | Cloudflare Fundamentals docs
Learn how to create a token to perform actions using the Cloudflare API.
5 Replies
can you try running a build by creating a new API token in the build configurations and let me know if that works?
I did, but same error
@aniniflare ok, so I tweaked the commands a little bit and now it is working. I don't know why... maybe turborepo wipes out the cloudflare enviroment variables?
what was the command you had before, and what is the command you use now? 😮
Look at the screenshots please
I quit using turborepo for deploy command