It is because of the length of the private key is not correct, or the private key setting cannot be found:
.env file is not located at the project root directory
Suppose your private key is 12345678901234567890123456789012 , so inside .env file:
PRIVATE_KEY=12345678901234567890123456789012
Maybe you have included other symbols like < or > , remove them.
Check if you have used the wallet address (public key).
.env is not located at the project root directoryAlthough the path of .env is configurable, it is simper to move the file to the project root directory.