I received the above error today whilst working on a new Bicep template which caused me a bit of confusion as it seemed to be indicating that a file was missing.
What I figured out in the end is that it was really saying that I had messed up something in my Bicep template file (in this instance I had mis-typed a parameter name). I suspect that during ‘compilation’ Bicep creates a .json file which corresponds to the equivalent ARM template and because it could not create this file due to the error it was showing me this slightly misleading message instead.
So if anyone else receives this error it is probably worth checking your bicep file before looking for anything more complicated.