singh Amardeep
singh Amardeep

Reputation: 67

getting an error while publish the on cloudflare workers?

I have created a folder called workers and inside that, I have used these commands to setup firstly i used npm init and then i used npm i @cloudflare/wrangler then it will created package.json and node_module folder and packagelock.json and then i used this command to generate a worker site npx wrangler generate --site practice

and then i moved to the practice folder and added the account id in the .toml file and when i am using wrangler publish or npx wrangler publish i am getting an error enter image description here

Upvotes: 1

Views: 2584

Answers (2)

Sarat
Sarat

Reputation: 1

If you have used sudo when doing a global install, you need to use sudo everytime you call wrangler. ex: sudo wrangler dev OR sudo wrangler publish etc

even wrangler login and wrangler config will not work without sudo

Upvotes: 0

Kenton Varda
Kenton Varda

Reputation: 45161

As the error says, you need to run wrangler login or wrangler config to set the credentials for your account.

Upvotes: 1

Related Questions