Update MiKTeX packages to avoid issues with compiling documents. This is even true for a fresh MiKTeX install.
- Start → MiKTeX → Update (Admin) You might need to run this twice
- Start → MiKTeX → Package Manager (admin) → Repository → Synchronize
Anytime you get an unexpected error, try updating MiKTeX packages.
Consider Windows Subsystem for Linux for compiling your LaTeX documents in Windows using a Microsoft-created Linux Windows Store Ubuntu app.