China cancels flights as typhoon nears