If you're using windows:
- search "env" in the windows search
- click on Edit environment variables for your account
- double click on path variable
- add a new path "C:Users*your_pc_name*AppDataLocalPubCachein"
Reopen the CLI window and try again. If it still doesn't work try running flutterfire.bat instead of flutterfire