Frappe.db.get_single_value is not working on web pages script

I am designing a website using ERPNext Website module. I have a web page and I want some data to be displayed from database on the screen.
I have passed all the parameters correctly and I am getting (index):1428 Uncaught (in promise) TypeError: Cannot read property ‘get_single_value’ of undefined