Not able to publish the static sites using the cloudflare workers site

I am trying to publish static pages to Cloudflare workers sites but i am unable to do that
I have followed the given steps only
npm i @cloudflare/wrangler
npx wrangler generate --site practice
cd practice
and then i have added the account-id from the dashboard
and then i am running wrangler publish then it will give us a
wrangler command is not defined
how to solve this error please reply asap

I’d say install the wrangler globally and make sure the wrangler command could be found on your system (I assume linux).

as you are saying i have used that method also


but i am not able to run

have you make sure the Wrangler could be found on the environment variable? I was having similar issue but mine problem because I have multiple Node installations.

Another way, try to install with cargo

https://developers.cloudflare.com/workers/cli-wrangler/install-update