I am getting the following error when executing the command firebase deploy --only function in my Ionic 3 project. This solution is not working for me.
firebase deploy --only function
Check if any space got added into starting of this file. I had the same issue and after removing the space in the top of the file it was working.