"Nothing is here yet" Error when using search or accessing link manually but working when it comes thouh other links

Hi,

I deployed my site using hugo. I copied .md files from my earlier sites from posts into it.

Now, every post link works fine when I click it through links. But when I use the search module, it shows results correctly, but when I click it, it gives me Cloudflare error Nothing is here yet. If the project exists, it may not be ready yet. Please check back later.. I think it is equivalent to 404.

But the same link works if I go through other links like pages, tag, categories etc. But when I use search it gives this error.

nb: cloudflare builds on /public directory. when I check public/search/index.json it shows all files in it correctly.

Also when I paste the same link in the address bar it gives same cloudflare error. Link works if come through other links though.

What should I do to fix this so that i could paste the link / search the page and the page shows up?

Please help.