Neither is correct. It should be You cannot do that. Modal verbs such as can are never followed by to .
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
Aspara GusModal verbs such as can are never followed by to.They are doing what they can to survive.