Wrangler authentication/login continues to fail

I created a Workers project that uses pnpm as the package manager, and ran the command pnpm wrangler login to log in to wrangler.

However, login continues to fail with the following message:

What is the reason and how can I solve it?

Successfully logged in.
Expired! Auth code or refresh token needs to be renewed.
Was this page helpful?