NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
What could be the possible reason. The code itself is quite long and I'm not sure how to mention it here. Can there be an issue with keeping the fanchdr package in a wrong folder though the error is only related to \pagestyle{fancy}
In my document I've used titlpage, chapters and sections. Could there be an issue with that?
You don't need to post your complete document. Create a copy of the document, and reduce it - remove text which is not part of the problem.
Often the preamble together with some dummy chapter resp. text could be sufficient, and even the preamble can be reduced, removing not relevant packages.
This text is helpful: What is a minimal working example. It may seem to be laborious, but a working example is usually a guarantee for getting a solution.
Your packages are located in C:\Program Files\MiKTeX 2.5\tex\latex, perhaps not fancyhdr? Is it in your document directory? If yes, move it away or rename it and test again, I would use fancyhdr of MiKTeX.
By the way, your MiKTeX installation 2.5 is very old (2006) and no longer supported, the current version is MiKTeX 2.9.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p