However, I am now getting this error when I try to compile
sorry about that - it looks like something's not right with your CLI install. try running the Particle: Update CLI
command from within Workbench. if that doesn't work, do you mind opening a new issue thread using the instructions here?
if it does, you can try flashing your device again. btw, if you are able to connect to your device via USB, you can also try the local flash task: Particle: Flash application (local)
https://docs.particle.io/tutorials/developer-tools/workbench/#local-build-and-flash
last thing - if you want full, verbose logging during local compilation and flashing, you can turn on the Enable Verbose Local Compiler Logging
option:
https://docs.particle.io/tutorials/developer-tools/workbench/#settings
hope it helps