Reputation: 67
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
Upvotes: 1
Views: 2584
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
Reputation: 45161
As the error says, you need to run wrangler login
or wrangler config
to set the credentials for your account.
Upvotes: 1