We consider the anomalies of W(infinite) gravity in the context of path-integral quanitzation. We derive the ghost-loop anomalies to all orders in h directly from the path-integral measure by the Fujikawa method. We also show that in the matter sector the higher-loop anomalies can be obtained by implementation of the Wess-Zumino consistency condition using the one-loop anomaly. Cancellation of the anomalies between these two sectors then leaves the theory anomaly-free.