Workers Build: API token does not work
Hi, I am trying to deploy my Nuxt app to cloudafare workers but the problem is that I followed the setup on the website, everything builds fine just for the last step when it tries to deploy it throws this error
I can only generate a new token but cant specify the permissions(reffering to the option in the build category in the setting on the cloudfare dashboard. Is there some way to fix this? Thanks!
10 Replies
Looks like you're trying to deploy to Pages? is this a Worker or Pages project?
worker
Then you'll want your deploy command to be
npx wrangler deploy not npx wrangler pages deployhmm thats wierd because when i was creating it it was a worker now it gave a error that it is a pages
so it is a worker( I used the filter in the Workers & Pages menu) but the wrangler deploy does not work only wrangler pages deploy
and the pages command throws the auth error
What's the error for wrangler deploy?
Sounds like you may have Pages code but made a Worker project, you can just use a Pages project instead - if you make a new app, pick Pages and select your repo or run
npx wrangler pages deploy locally and make new project
I will try that
I selected workers because of this popup
Yep, Workers is the recommended way to build new apps but if you're using Pages stuff you can still use Pages.
You can also move it to Workers but that's not a requirement
So you are saying to use pages for now?
for this case
Yeah, that seems like the easiest path forward
thanks that worked flawelessly