I think I am facing the same/related issue. Last week I deployed a branch and it worked fine but today I made a small update (2 lines) and it caused a build error. I checked the source code of the deployment last week and it had the code referenced in the build error. Like the cases above it builds and runs locally without any issues.
