Issue with the cache folder in flutter/bin/

I’m new to flutter, and have been working through the docs to get everything installed. Everything seems to have installed properly, but every time I sit down to start building, I get the following errors:

  • Error: Error when reading '../../bin/cache/dart-sdk/bin/snapshots/pub.dart.snapshot': No such file or directory
  • Error: Unable to 'pub upgrade' flutter tool

After reading online, i found that deleting my cache folder located in flutter/bin/ seems to resolve the issue. However, this is something I’ve had to do a few times now (if I try to run flutter on a different day, or even in a separate terminal).

Has anyone else experienced this and know how to resolve it? It’s extremely frustrating and is making development a pain.

once try with the InvalidateCache/Restart your project else
do flutter clean in Tools

to clarify, I can’t run any flutter commands until I delete the cache folder. The issue isn’t that I can’t clear the cache, it’s that I have to clear it every time I try to run my project