Good morning all, I got error with frappe when using it in custom frontend js file. System notice: frappe is undefined. This is the code:
export function sendMessageToIframe(iframeId, message) {
frappe.ready(function() {
console.log(frappe.session.user);
user = frappe.session.user;
callFunction(iframeId, message, user)
});
}
Folder tree:
frappe_project
└── apps
├── frappe
└── custom_app
├── frontend
│ └── public
│ └── utils
│ └── file.js ***
├── custom_app
└── node_modules