The present invention provides a method for producing a compound represented by the following formula (I) with a compound represented by the following formula (A) as a starting substance via production of an intermediate represented by the following formula (B) by use of a trifluoroacetic acid ester and a metal base.